GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — fix(java): a contested name fails its own query, not the whole application by rahlk · Pull Request #421 · codellm-devkit/python-sdk Conversation
Collaborator
Closes #420. Related: codellm-devkit/codeanalyzer-java#269 (where the duplicates originate). The defect
Surfacing the ambiguity was right. Refusing the whole application for it was not. The changeBoth backends record the competing files while indexing and refuse at the name-addressed query, through one shared guard on def _refuse_if_contested(self, qualified_class_name: str) -> None: paths = getattr(self, "_contested", {}).get(qualified_class_name) if paths: raise CodeanalyzerExecutionException(duplicate_type_name(qualified_class_name, paths)) That also settles an inconsistency: the in-memory backend raised at construction while Nothing is dropped. Callables stay keyed by their own The message no longer blames the analyzer — it emitted both declarations correctly, with distinct ids; the duplication is a property of the source tree — and now names the colliding files so the reader can act on it: Why not "return all candidates"Considered and rejected; reasoning recorded on #420. The name-addressed methods are on the shared cross-language ABC ( Public signatures are untouched — Tests
Verification
SequencingWorth landing with or behind codellm-devkit/codeanalyzer-java#269. The index-time raise was the only mechanism telling a caller the input was unsafe; bundled analyses now load, and until #269 lands they will load with the wrong-copy call edges the analyzer emits. This PR makes the ambiguity precise, not the resolution correct. Base branchOpened against
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…ation JCodeanalyzer._add_type raised while flattening the containment tree, so an application carrying duplicate qualified names could not be loaded at all -- and every query became unavailable, including the overwhelming majority naming no duplicated type. The realistic input is a monorepo whose services vendor a shared internal library, which puts several copies of one package into one analysis. Surfacing the ambiguity was right; refusing the whole application for it was not. Both backends now record the competing files while indexing and refuse at the name-addressed query instead, through one shared guard so they fail at the same point on the same input -- previously the in-memory backend raised at construction while the Neo4j backend's cached _idx raised lazily, despite a docstring claiming they mirror each other. Nothing is dropped: callables stay keyed by their own can:// id, which is distinct per copy, so every copy remains addressable even while its name is not. Public signatures are untouched, so no caller changes -- get_class still returns JType | None, and the 113 public-surface tests pass unchanged. That was the reason for preferring this over widening the return types to a collection: those methods live on the shared cross-language ABC, so the plural shape would have touched 44 definitions across 10 files and charged Python and TypeScript for a Java monorepo's vendored copies. The message no longer attributes the duplication to the analyzer, which emitted both declarations correctly with distinct ids, and now names the files that collided so the reader can act on it. Closes #420 This branch has not been deployedNo deployments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
fix
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Duplicate FQNs make a Java application unloadable, not just its ambiguous queries unanswerableUh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |