Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multi-scope diagnostics #1135

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

TwitchBronBron
Copy link
Member

Adds some diagnostics as multi-scope diagnostics so we don't clutter the diagnostics list with the same diagnostic over and over

}
}

private multiScopeCache = new Cache<string, BsDiagnosticWithOrigin>();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need to clear this cache between each scope validation (similar to what we do in ScopeValidator)

@markwpearce markwpearce merged commit 3a103c4 into validate_single_scope Apr 12, 2024
2 of 5 checks passed
@markwpearce markwpearce deleted the addMultiScopeDiagnostic branch April 12, 2024 18:11
markwpearce added a commit that referenced this pull request May 31, 2024
* Validate a file in a single scope context only

* wip

* Updated algorithm

* Turned off duplicatesymboldiagnostics

* Logic seems to be working

* Remove commented out code

* Try out validation without subscope namespace trees

* Removed sub-scope namespace table caching in favor of full-scope requires vs provides checking

* fixed windows path separators in tests

* removed unused and commented out code

* more commented out code removed

* Sort scopes and files so they are processed more consistently.

* Removed another commented out line of code

* Removed program.lastValidationInfo, finds more resolutions in cross scope validation, and modifies scopeName sorting

* removed file info generation validation metric

* Fixed lint error

* Added test

* Solved issue of looking for relative namespace types

* Fixes for m. and super() as unresolved symbols in classes

* Support multi-scope diagnostics (#1135)

Co-authored-by: Mark Pearce <markwpearce@gmail.com>

* WIP

* Uses a tree of provided nodes instead of a map

* Using multi-scopes

* all tests pass

* fixed lint error

* Fixes font type from docs

* Fixed issue with union types in type expressions

* fixes lint errors

* Fixes #1164

* Checks non-aliased versions of required symbols when revalidating

* Fix crash when transpiling an unknown namespace

* Fix lint issue

* Remove ClassType.superClass in favor of .parentType

* Added breaking test

* Cross Scope Validation also looks at members of interfaces/classes across all scopes

* Also validate files that require a changed symbol

* Only revalidate segments with changed symbol

* Cache potential names of unresolved symbol

* Make scope validation logging debug level

* Really only validate segments that need it.. i think.

* fixes issue of const defined from other reftypes

* cahce components map for each validation cycle

* Moved all name collision checking code to CrossScopeValidator

* Handles invalid in union type member tables

---------

Co-authored-by: Bronley Plumb <bronley@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants