-
-
Notifications
You must be signed in to change notification settings - Fork 771
refactor(semantic): align handling of declaring symbol for function with TypeScript #10086
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
Merged
graphite-app
merged 1 commit into
main
from
03-28-refactor_semantic_align_handling_of_declaring_symbol_for_function_with_typescript
Mar 28, 2025
Merged
refactor(semantic): align handling of declaring symbol for function with TypeScript #10086
graphite-app
merged 1 commit into
main
from
03-28-refactor_semantic_align_handling_of_declaring_symbol_for_function_with_typescript
Mar 28, 2025
Conversation
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
This was referenced Mar 28, 2025
Member
Author
CodSpeed Instrumentation Performance ReportMerging #10086 will not alter performanceComparing Summary
|
Member
Merge activity
|
e81ae1e to
50b2970
Compare
50b2970 to
dde0a96
Compare
c29f055 to
132631b
Compare
132631b to
7116b2c
Compare
dde0a96 to
51660e6
Compare
51660e6 to
0b5161c
Compare
graphite-app bot
pushed a commit
that referenced
this pull request
Mar 28, 2025
…ith TypeScript (#10086) The `Symbol` is based on the `TypeScript` implementation, but `TypeScript` doesn't support non-strict mode. So we tweaked the implementation to support non-strict mode before, but that held us back from adding symbol id for `declare function`, because `declare function oxc(): number; declare function oxc(): void` is valid, but we have no idea except introducing more symbol flags by to check whether it is a declare function. But introducing more symbol flags will lead to greater discrepancies between our implementation and `TypeScript`. #10074 has re-implemented the function redeclaration check in `checker` so that this PR can make a change to align with `TypeScript` implementation without leading to unexpected errors. A lot of error messages are removed in snapshots, because they are all duplicated, which was introduced by #10074
7116b2c to
98ac03b
Compare
0b5161c to
5f8c64c
Compare
graphite-app bot
pushed a commit
that referenced
this pull request
Mar 28, 2025
…ith TypeScript (#10086) The `Symbol` is based on the `TypeScript` implementation, but `TypeScript` doesn't support non-strict mode. So we tweaked the implementation to support non-strict mode before, but that held us back from adding symbol id for `declare function`, because `declare function oxc(): number; declare function oxc(): void` is valid, but we have no idea except introducing more symbol flags by to check whether it is a declare function. But introducing more symbol flags will lead to greater discrepancies between our implementation and `TypeScript`. #10074 has re-implemented the function redeclaration check in `checker` so that this PR can make a change to align with `TypeScript` implementation without leading to unexpected errors. A lot of error messages are removed in snapshots, because they are all duplicated, which was introduced by #10074
98ac03b to
8376903
Compare
…ith TypeScript (#10086) The `Symbol` is based on the `TypeScript` implementation, but `TypeScript` doesn't support non-strict mode. So we tweaked the implementation to support non-strict mode before, but that held us back from adding symbol id for `declare function`, because `declare function oxc(): number; declare function oxc(): void` is valid, but we have no idea except introducing more symbol flags by to check whether it is a declare function. But introducing more symbol flags will lead to greater discrepancies between our implementation and `TypeScript`. #10074 has re-implemented the function redeclaration check in `checker` so that this PR can make a change to align with `TypeScript` implementation without leading to unexpected errors. A lot of error messages are removed in snapshots, because they are all duplicated, which was introduced by #10074
5f8c64c to
370266c
Compare
8376903 to
5d829c2
Compare
Base automatically changed from
03-27-feat_semantic_check_redeclaration_of_variable_declaration_and_function_declaration_in_the_block_scope
to
main
March 28, 2025 07:42
Boshen
added a commit
that referenced
this pull request
Apr 1, 2025
## [0.16.4] - 2025-04-01 - da6336c language_server: [**BREAKING**] Remove `enable` configuration, the client should shutdown the server instead (#9990) (Sysix) ### Features - 06e3db9 linter: Support `multipleFileExtensions` option for `unicorn/filename-case` (#10118) (shulaoda) - dbe0e46 linter: Support `ignore` option for `unicorn/filename-case` (#10107) (shulaoda) ### Bug Fixes - 0a33e27 editor: Update `initializationOptions` for a possible restart (#10121) (Sysix) - ac780a2 editor: Repair filewatchers when no custom config provided (#10104) (Sysix) - 4303ace editor: Dont send `didChangeConfiguration` request to the server when it is shutdown (#10084) (Sysix) - 07f2a25 editor: Enable regex parsing in language server (#10035) (camchenry) - fcf7702 language_server: Start from a default oxlint configuration + SafeFix for nested configuration (#10043) (Sysix) - aba3654 linter: Span disable directive correctly on next line (#10141) (Ulrich Stark 🦀) - 2c80858 linter: Enable multi-file analysis for nested configs (#10089) (camchenry) ### Performance - 566be59 linter: Replace `phf_set` with `array` in `eslint/func-names` (#10119) (shulaoda) - 5e14fe9 linter: Inline `PRE_DEFINE_VAR` and use `array` format (#10079) (shulaoda) ### Refactor - 327be53 editor: `LanguageClient` can be undefined (#10112) (Sysix) - 5ec477c editor: Make `onConfigChange` async (#10110) (Sysix) - a278d73 editor: Use warning background when the plugin is deactived (#10085) (Sysix) - c0e5251 language_server: Set `null` as a default value for `configPath` (#10047) (Sysix) - 09c0ac6 linter: Improve `unicorn/filename-case` (#10117) (shulaoda) - d8e49a1 linter: Compute lintable extensions at compile time (#10090) (camchenry) - b3ec235 linter: Use items of `oxc_ast::ast` module directly (#10100) (Ulrich Stark 🦀) - 93e6c0b linter: Use `FormalParameter::has_modifier` to detect parameter properties (#10097) (Ulrich Stark 🦀) - 5d829c2 semantic: Align handling of declaring symbol for function with TypeScript (#10086) (Dunqing) ### Testing - 410b8d6 editor: Use debug build of the language server (#10083) (Sysix) - 500add0 editor: Add test for `oxc.fixAll` command (#10045) (Sysix) Co-authored-by: Boshen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-cli
Area - CLI
A-linter
Area - Linter
A-semantic
Area - Semantic
C-cleanup
Category - technical debt or refactoring. Solution not expected to change behavior
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.

The
Symbolis based on theTypeScriptimplementation, butTypeScriptdoesn't support non-strict mode. So we tweaked the implementation to support non-strict mode before, but that held us back from adding symbol id fordeclare function, becausedeclare function oxc(): number; declare function oxc(): voidis valid, but we have no idea except introducing more symbol flags by to check whether it is a declare function. But introducing more symbol flags will lead to greater discrepancies between our implementation andTypeScript. #10074 has re-implemented the function redeclaration check incheckerso that this PR can make a change to align withTypeScriptimplementation without leading to unexpected errors.A lot of error messages are removed in snapshots, because they are all duplicated, which was introduced by #10074