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: do not panic linting files with UTF-8 BOM #24136

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Jun 7, 2024

Closes #24122

Copy link
Member Author

Choose a reason for hiding this comment

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

---- specs::lint::bom ----
command V:\deno\target\debug\deno.exe lint mod.ts
command cwd V:\deno\tests\specs\lint\bom
output path V:\deno\tests\specs\lint\bom\mod.out

panicked at tests\specs/mod.rs:391:12:
assertion failed: `(left == right)`

Diff < left / right > :
<
<============================================================
<Deno has panicked. This is a bug in Deno. Please report this
<at https://github.com/denoland/deno/issues/new.
<
<Platform: windows x86_64
<Version: 1.44.1
<Args: ["V:\\deno\\target\\debug\\deno.exe", "lint", "mod.ts"]
<
<thread 'tokio-runtime-worker' panicked at V:\.cache\cargo\registry\src\index.crates.io-6f17d22bba15001f\dprint-swc-ext-0.16.0\src\common\pos.rs:348:3:
<byte index 84 is out of bounds of `// this file is saved as UTF8 with BOM
<console.log("Hello, world!");
<
<const t = 5;
<`
<note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM

@dsherret dsherret enabled auto-merge (squash) June 7, 2024 16:39
@dsherret dsherret merged commit 78774dd into denoland:main Jun 7, 2024
17 checks passed
nathanwhit pushed a commit that referenced this pull request Jun 13, 2024
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.

deno lint panicks after the 1.44.1 upgrade on file saved as UTF-8 w/ BOM
3 participants