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

fix(linter): panic in consistent-function-scoping #5613

Merged

Conversation

DonIsaac
Copy link
Contributor

@DonIsaac DonIsaac commented Sep 8, 2024

Closes #5608

Copy link

graphite-app bot commented Sep 8, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@DonIsaac DonIsaac marked this pull request as ready for review September 8, 2024 15:32
Copy link
Contributor Author

DonIsaac commented Sep 8, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @DonIsaac and the rest of your teammates on Graphite Graphite

@github-actions github-actions bot added the A-linter Area - Linter label Sep 8, 2024
@camc314
Copy link
Contributor

camc314 commented Sep 8, 2024

@DonIsaac why was the symbol id None ?

@DonIsaac
Copy link
Contributor Author

DonIsaac commented Sep 8, 2024

No idea. If there's a bug in semantic, it still needs fixing. Either way, the linter should not panic because of bugs in semantic.

Copy link

codspeed-hq bot commented Sep 8, 2024

CodSpeed Performance Report

Merging #5613 will not alter performance

Comparing don/09-08-fix_linter_panic_in_consistent-function-scoping (af6d240) with main (d22a9b7)

Summary

✅ 29 untouched benchmarks

@camc314
Copy link
Contributor

camc314 commented Sep 8, 2024

No idea. If there's a bug in semantic, it still needs fixing. Either way, the linter should not panic because of bugs in semantic.

agreed. although we have a lot of .expects on getting symbol ids. e.x. https://playground.oxc.rs/#eNo9jtENwyAMRFdB/mqlqAMwQCfoApRC5QpMZIzUKGL3mqTJl30+3Tuv4MECRnOJVxMbecFCRuXVrB0mKGBX4EZj1IXEfcFGl2qYICEJWOGme/VlDqdY8rOkQwk7qrFw/gf7BLPjGnhDlsY+3DEFclkBIKHK7VO1ebcey+Aqn3EW0Oxo3bK6n+jj4MsrvMN4VkVGwoi71fsPwABQsA== panics inside only_used_in_recursion.rs:226:56, so might just be better to fix in semantic

@camc314
Copy link
Contributor

camc314 commented Sep 8, 2024

maybe we should add debug asserts here for the symbol_id == None case

@Boshen
Copy link
Member

Boshen commented Sep 9, 2024

This is they only case that makes it none, let me create an separate issue.

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Sep 9, 2024
Copy link

graphite-app bot commented Sep 9, 2024

Merge activity

  • Sep 8, 9:12 PM EDT: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Sep 8, 9:12 PM EDT: Boshen added this pull request to the Graphite merge queue.
  • Sep 8, 9:40 PM EDT: Boshen merged this pull request with the Graphite merge queue.

@Boshen Boshen force-pushed the don/09-08-fix_linter_panic_in_consistent-function-scoping branch from e1acafc to af6d240 Compare September 9, 2024 01:21
@graphite-app graphite-app bot merged commit af6d240 into main Sep 9, 2024
26 checks passed
@graphite-app graphite-app bot deleted the don/09-08-fix_linter_panic_in_consistent-function-scoping branch September 9, 2024 01:40
@oxc-bot oxc-bot mentioned this pull request Sep 12, 2024
Boshen added a commit that referenced this pull request Sep 12, 2024
## [0.9.4] - 2024-09-12

### Features

- 9ca2593 linter: Eslint/sort-keys  (#4845) (Na'aman Hirschfeld)
- 023c160 linter: Impl `Serialize` for `OxlintConfig` (#5594) (DonIsaac)
- 24d6a47 linter: Implement `eslint/no-invalid-regexp` (#5443) (Boshen)

### Bug Fixes

- af6d240 linter: Panic in consistent-function-scoping (#5613)
(DonIsaac)
- 54e2e76 linter: `react/no_set_state` + `react/no_string_refs` rules
find correct parent (#5615) (overlookmotel)
- 3b87ac4 linter: Fix no_unused_vars panic when encountering unicode
(#5582) (Boshen)

### Performance

- bfe9186 linter: Use `cow_replace` instead of `replace` (#5643)
(dalaoshu)
- e3ae5db linter: Use cow_to_ascii_lowercase/uppercase (#5637) (heygsc)
- a0370bf linter: Use cow_utils in no_script_url (#5633) (heygsc)
- 37e922c linter: `eslint/no_shadow_restricted_names` use
`run_on_symbol` (#5618) (overlookmotel)
- 0b7fccf linter: `react/no_set_state` + `react/no_string_refs` rules
reduce iteration over ancestors (#5616) (overlookmotel)
- 2c3f3fe linter: Make `jsx_key` slightly faster (#5585) (Boshen)
- cd81d12 linter: Add `should_run` to check path only once to
nextjs/no_typos (#5584) (Boshen)
- d18c896 rust: Use `cow_utils` instead (#5664) (dalaoshu)

### Documentation

- 64f9575 linter: Add plugin usage to example with configuration
(Boshen)
- 8c9179d linter: Fix typos (#5591) (Brian Donovan)

### Refactor

- 9e9435f linter: Add `LintFilter` (#5685) (DonIsaac)
- 4f70fe5 linter: Start internal/external split of LintPluginOptions
(#5660) (DonIsaac)
- 5ae9b48 linter: Start internal/external split of `OxlintOptions`
(#5659) (DonIsaac)
- c8bc6f0 linter: Use `std::ptr::eq` (#5649) (overlookmotel)
- a37c064 linter: Use `ContentHash` for `no_duplicate_case`; remove
`calculate_hash` (#5648) (Boshen)
- 0b3c1d7 linter: Start internal/external split of `OxlintConfig`
(#5595) (DonIsaac)
- 89bdf55 linter: Inline `Rule` trait default methods (#5619)
(overlookmotel)
- afea8d5 linter: Rename `Rule` trait method params (#5617)
(overlookmotel)
- 4e748b5 linter: Replace ast "compare by hash" to "compare by content"
(#5602) (dalaoshu)
- bac03e3 linter: Make fields of `LintServiceOptions` private (#5593)
(DonIsaac)
- 2661d8b linter: Jest prefer_strict_equal (#5588) (IWANABETHATGUY)
- 20d0068 oxlint: Move cli-related exports to `cli` module (#5139)
(DonIsaac)
- 067f9b5 semantic: Introduce `IsGlobalReference` trait (#5672)
(Boshen)- 26d9235 Enable clippy::ref_as_ptr (#5577) (夕舞八弦)

### Testing

- 8e79f8d linter: Add class method test cases for `oxc/no-async-await`
(#5550) (DonIsaac)
- 3835189 linter: Add test case for no_unused_vars in 3b87ac4 (Boshen)
- 5f27551 linter: Add a passing case to no_undef (#5580) (Boshen)

---------

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This was referenced Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-merge Merge with Graphite Merge Queue A-linter Area - Linter
Projects
None yet
3 participants