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

v1.0.0 #1056

Open
wants to merge 234 commits into
base: master
Choose a base branch
from
Open

v1.0.0 #1056

wants to merge 234 commits into from

Conversation

TwitchBronBron
Copy link
Member

This is the official branch for the v1.0.0 release, tracking milesone v1.0.0.

TwitchBronBron and others added 30 commits June 5, 2023 07:54
* Add abstract TypeExpression class

* Convert type tokens to TypeExpressions (#785)

* Convert type tokens to TypeExpressions

* Fixed all tests

* Rebased and fixed any other merge issues

* Further work on SymbolTypeFlags

* Lint fixes

* Fixed issue with using enums as variables

* Uses complete TypeName as Custom type for TypeExpression.getType()

* Removed commented out code, fixed tests

* Fixes from PR review

* Fixed lint issues

---------

Co-authored-by: Mark Pearce <mark.pearce@redspace.com>

* Removes Parsetime Static Type Setting (#791)

* Refactors statically set type to use a function

* Lint fixes

* Removed symbolTable getter from function scope - not used

* Adds ReferenceType (#792)

* Added ReferenceType and some tests

* Added scope linking for hovers

* Removed catch in try/finally in hoverprocessor

* Reverted typo

* Removed commented out code

* Changed to using Proxy, fixed circular references

* Fixed lint, added proper isReferencetype reflection

* Added members to `BscType`, and adds ReferenceType (future lookups) (#794)

* Large update to move BscType to a class and add ReferenceTypes

* Fixes validation errors when calling a dynamicType like a function

* Correctly resolves return types after a function call.

* Removed some commented out or dead code

* Fixed build errors

* BscType.symbolTable -> memberTable, PropertyReferenceType->TypePropertyReferenceType

* Fixed test that should fail

* Fix enum transpile crash

* Refactored `getType` to correctly use `SymbolTypeFlags` (#798)

* Fixed issues with namespaces and invalid things being used as types

* Removed unneeded method

* Ran npm install with latest code

* Removed commented and vestigal code, and added TODOs

* Removed additional commented code

* ClassType and InterfaceType refactor and Inheritance (#800)

* Changed CustomType to ClassType

* Adds BscType.equals(), and ClassType tests for inheritance

* Fixes issue when looking for members of classes with supertypes that were originally ReferenceTypes

* Rerfactor of InterfaceStatement and InetrfaceType work more similar to Classes

* Added tests, changed parentClass/Interface to use TypeExpression

* Fixes issue when classes and namespaces extend from a namespaced parent

* Changes from code review

* Type chain refactor (#802)

* Changed getType() methods to use an options parameter

* Refactors getType() to add opttions, and can find all the types in a chain of types

* Fixed lint errors

* Updated Tests

* Update src/interfaces.ts

Co-authored-by: Bronley Plumb <bronley@gmail.com>

* name change

---------

Co-authored-by: Bronley Plumb <bronley@gmail.com>

* Adds Union types (#803)

* initial commit

* Adds UnionType and associated tests

* Added helper functions to get the most general type from a list of types, including Union types

* Started working on Uniontype.membersTypes

* Started working on Uniontype.membersTypes

* Refactor of types to use  instead of

* Fixed lint errors

* Reverted benchmark package changes

* Removes `NamespacedVariableNamedExpressions` (#801)

* Removes NamespacedVariabledNamedExpressions

* Fixed rest of tests

* Fixes ignored parameter value in Parser.identifyingExpression

* UnionType Improvements (#806)

* Reworked type uniqness checking

* Changed logic of InterfaceType.isEqual

* Able to get member types from a UnionType

* Fixed lint errors

* Starting to add UnionExpression and parsing

* Added pipe token

* Added test for if inner type does not include member in UnionType.getMmeberTypes

* Updated UnionExpression transpile logic

* Re-added whitespace

* removed pipe in favor of 'or' for declaring/displaying union types

* Fix lint/build issues

* TypeExpressions more narrowly look for what they can accept

* Whitespace and typo fixes

* Adds unionType validation tests and allows uniontypes innertypes to be late defined

* fixed lint error

* Fixes issue with ReferenceTypes not displaying a full name

* Fix self references in unions (#808)

* Fixes issue with self-referencing symbols in unions

* Fixed lint error

* Type performance improvements (#811)

* Fixes issue with self-referencing symbols in unions

* Fixed lint error

* Starting performance benchmarking

* Starting performance benchmarking

* getType -> ZgetType()

* Reverse getType removal

* Removes double validation in ScopeValidator

* Trying out type caching

* Some benchmark thing

* Removes TypeCache

* Made the in typeExpression function more robust

* Removed unneeded code

* removed bad imports

* Fixes issue with potential crash when checking types

* Adds `enableTypeValidation` flag and documentation (#812)

* Added bsConfig option for enhancedTypingValidation

* Reverted any benchmark changes

* Added docs for 'enhancedTypingValidation' option

* Adds documentation

* In an effort to increase non-enhancedtypeValidation, old methods were re-added to short circuit getType() calls

* Changed flag to enableTypeValidation

* Fixed docs

* Fixed readme formatting

* Fixes from PR review

* Adds SymbolTable.getSymbolType() to wrap caching and ReferenceType creation (#813)

* Adds SymbolTable.getSymbolType() to wrap caching and ReferenceType creation

* Removed commented out code

* Add SymbolTable exports for plugins, etc

* Added exports from ./types

* Adds Type Casting  (#814)

* Adds TypeCastExpression

* Adds TypeCast expression

* fix lint issue

---------

Co-authored-by: Bronley Plumb <bronley@gmail.com>

---------

Co-authored-by: Mark Pearce <mark.pearce@redspace.com>
Co-authored-by: Mark Pearce <markwpearce@gmail.com>
* Adds .kind prop to AstNode.
Converts reflection methods to check `kind` which is faster.

* Move .kind props after constructor

* Add BscType .kind, and convert all .kind to strings since it's as fast as ints.
* Refactor XML AST

* Add findLastIndex util function.

* Refactor names of certain nodes

* fix some names

* Rename other elements

* Remove benchmarking log
* Rename SymbolTypeFlags to SymbolTypeFlag

* Remove deprecated functionality
* Rename SymbolTypeFlags to SymbolTypeFlag

* Remove deprecated functionality

* Fix range for missing prop diagnostic
* Updated some references to enableTypeValidation

* Fixes issue with namespace declaration order
Co-authored-by: Bronley Plumb <bronley@gmail.com>
* Performance fixes

* Lift `isUsedAsType` to cached expressionInfo obj

* Slightly more aggressive symbol type caching

* Cache speed boost

* Potentially solved Scope Linking  slow down (#840)

* Potentially solved Scope Linking  slow down

* Favor focused parent lookup instead of parse-time link

---------

Co-authored-by: Bronley Plumb <bronley@gmail.com>

* Make CacheVerifier more stable

* fix cross-platform benchmark bug

* Disable execSync logging

* Add specific configuration options for benchmarks at the command line (#841)

Co-authored-by: Bronley Plumb <bronley@gmail.com>

* Added package.json back

* Small optimization during symbol table linking

* Better symbol table type retrieval - uses parent and sibling caches (#842)

* Better use of cache for getting symbol types

* Adds space after function

* Prevent leaking sibling tables

* Add more benchmark padding (just cuz)

* Revert `getSymbolTypeRecursive`

* Better return type for `getScopeByName`

* Optimize buildNamespaceLookup and some string stuff

---------

Co-authored-by: Mark Pearce <markwpearce@gmail.com>
Co-authored-by: Mark Pearce <mark.pearce@redspace.com>
* Removed enableTypeValidation option

* reverted benchmarks change
* BinaryExpression returns runtime type of lhs and rhs

* Added symbolTable type check for binary expressions

* Added unary expression getType()

* Deal with compound assignments as well

* White space change

* Added pne more test

* More tests

* Added function call validation (#839)

* Refactor of hover processing, using SymbolTables and enableTypeValidation (#828)

* Refactor of hover processing, using SymbolTables and enableTypeValidation

* build fix

* Uses SymbolTable and TypeChains for hover details

* Build/lint fixes

* Fix failing tests (caused by having wrong types!)

---------

Co-authored-by: Bronley Plumb <bronley@gmail.com>
* Allow `as object` types to be used almost everywhere like dynamic

* Fix tsc warning
* Added proper validaton for functions as params

* Fixed lint errors and added hover test

* fixed some places with wrong function type
markwpearce and others added 30 commits May 21, 2024 10:59
* Adds AugmentedAssignmentStatment

* updated some comments and whitespace

* Update src/bscPlugin/validation/ScopeValidator.ts

Co-authored-by: Bronley Plumb <bronley@gmail.com>

* Update src/bscPlugin/validation/ScopeValidator.ts

Co-authored-by: Bronley Plumb <bronley@gmail.com>

* All uses of a compound assignment token will be AugmentedAssignments

---------

Co-authored-by: Bronley Plumb <bronley@gmail.com>
* Fix crash for semantic tokens when range is null

* Tweak comment
* Fix crash when transpiling an unknown namespace

* Fix lint issue
* 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>
* Document the deprecated `ifMessagePort.setPort()` method.

* Move to rourltransfer object

* Pass through deprecated flag

* Fix lint issues
* Document the deprecated `ifMessagePort.setPort()` method.

* Move to rourltransfer object

* Pass through deprecated flag

* Fix lint issues

* Show deprecated items in editor

* Fix failing test
#1212)

* Removes 'duplicate enum' diagnostic and makes 'duplicate function' multi-scope

* removed some commented out/unused code

---------

Co-authored-by: Bronley Plumb <bronley@gmail.com>
…gs (#1211)

* Refines DiagnosticManager.clearByFilter to clear by null values

* Use more specific scope validator diagnostic tags

* removed extra parens
* Handles empty blocks without StartingRange

* removed more references to startingrange

* Update src/parser/Statement.ts

Co-authored-by: Bronley Plumb <bronley@gmail.com>

* Update src/parser/Statement.ts

Co-authored-by: Bronley Plumb <bronley@gmail.com>

* adds tests

---------

Co-authored-by: Bronley Plumb <bronley@gmail.com>
* Added tests for inline conditional statements

* Fix lint issue

* Renamed variable to better refelct what it means
* Refactor getLeadingTrivia to always return an editable array

* Added test for verifying leading trivia can be edited:

* Extra protection if annotations have to leading trivia
* Rename `util.createLocation` to `createLocationFromRange`

* Convert all usage of `.range` to `.location.range`

* Fix many broken tests

* Fix remaining failing tests

* Add tests for sourcemaps from multiple files

* Fix sourceRoot bug

* Remove `as any` a few places, fix a diagnostic missing range
* Fixes completions when file in multiple scopes

* Adds log timing message for completions, moves global completions outside of loop
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.

None yet

4 participants