Provide resolution diagnostics (inline) [rebased on main]#610
Draft
Provide resolution diagnostics (inline) [rebased on main]#610
Conversation
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
- Add PartialOrd/Ord derives to DefinitionKind (required for .cmp() in orphan_report) - Fix orphan_report.rs to use typed DefinitionKind enum instead of string literals - Fix add_diagnostic to deduplicate (prevents duplicate emissions on retry) - Fix linearize_mixins extend to also deduplicate diagnostics - Fix unit_queue: use self.unit_queue consistently; rename Unit::Reference → Unit::ConstantRef - Skip synthetic singleton class names (<Foo>) in unresolved constant reference drain loop - Update tests that were added to main after the original branch diverged
Add as_api_str() to DeclarationKind for PascalCase API names (Class, Module, etc.) and update server.rs to use it instead of treating kind() as &str.
bc97613 to
47c9266
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Rebased version of #502 on top of current
main.Summary
Adds resolution diagnostics that are emitted inline during resolution (rather than in a post-processing pass):
KindRedefinition— redefining a constant as a different kind (e.g., class → module)ParentRedefinition— redefining a class's superclassNonClassSuperclass— using a non-class as a superclassCircularDependency— circular inheritance or mixin chainsNonModuleMixin—include/prependwith a non-moduleUnresolvedConstantReference— constant references that can't be resolvedChanges from #502
Unit::ConstantRef(wasUnit::Reference)DefinitionKindandDeclarationKindextraction (now enums, not&str)add_diagnosticandlinearize_mixinsto prevent duplicate emissions during ancestor retry loops<Foo>) when emitting unresolved constant reference diagnostics