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

Panics when testing files #232

Closed
qarmin opened this issue Mar 31, 2023 · 5 comments
Closed

Panics when testing files #232

qarmin opened this issue Mar 31, 2023 · 5 comments
Assignees
Labels
A-linter Area - Linter C-bug Category - Bug

Comments

@qarmin
Copy link

qarmin commented Mar 31, 2023

oxc_cli lint all .

crashes with such messages

thread 'main' panicked at 'byte index 21 is not a char boundary; it is inside '\u{ae3a6}' (bytes 18..22) of `  static async * #򮎦W_‌_NJ(value) {`', crates/oxc_diagnostics/src/graphic_reporter.rs:599:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error', crates/oxc_cli/src/lint/runner.rs:171:70

Broken files - Broken_138.zip

@Boshen Boshen added C-bug Category - Bug A-linter Area - Linter labels Mar 31, 2023
@Boshen Boshen self-assigned this Mar 31, 2023
@Boshen Boshen added this to the 0.0.3 milestone Mar 31, 2023
@Boshen
Copy link
Member

Boshen commented Mar 31, 2023

Thank you for trying out oxc! It's probably a unicode line ending \u{2028} or \u{2029} in one of the TypeScript files. Real code don't use unicode line endings so I neglected them 😅

One of the source code lookup is broken:

https://github.com/Boshen/oxc/blob/main/crates/oxc_linter/src/disable_directives.rs#L96

Boshen added a commit that referenced this issue Apr 1, 2023
* fix(oxc_parser): fix panic when EOF on a multi-byte character

relates #232

* fix(parser): fix panic on multi-byte char in private identifer

relates #232
@Boshen Boshen removed this from the 0.0.3 milestone Apr 2, 2023
@Boshen
Copy link
Member

Boshen commented Apr 5, 2023

@qarmin I tested the latest release (v0.0.4) and it all passed without panics.

npx oxidation-compiler@latest lint .

@qarmin
Copy link
Author

qarmin commented Apr 5, 2023

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error', crates/oxc_cli/src/lint/runner.rs:171:70
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', crates/oxc_parser/src/lib.rs:228:44

Command oxc_cli lint -A all a.js --fix

Broken_355.zip

@Boshen
Copy link
Member

Boshen commented Apr 10, 2023

@qarmin Can you try the latest version (v0.0.5) npx oxidation-compiler@latest lint .

@qarmin
Copy link
Author

qarmin commented Apr 10, 2023

For now I cannot reproduce any problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter C-bug Category - Bug
Projects
None yet
Development

No branches or pull requests

2 participants