-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update line number start to 0 #4082
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong place to fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should modify miette adapter instead
Updating failing tests. |
@kdy1 do you know if there is a way of generating the
I see that there's a total of 1084 files. Would be very time consuming to fix all manually. |
You can run `UPDATE=1 cargo test`
It's in contributing.md
2022년 3월 19일 (토) 오후 4:09, Edwin Coronado ***@***.***>님이 작성:
… @kdy1 <https://github.com/kdy1> do you know if there is a way of
generating the *.stderr files programmatically? After running this in
root directory:
find . -name '*stderr' | wc -l
I see that there's a total of 1084 files. Would be very time consuming to
fix all manually.
—
Reply to this email directly, view it on GitHub
<#4082 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHELSJ7K5QPBEAL7OIQL5G3VAV4S7ANCNFSM5RCXCGHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want, I can update test references for you
@@ -109,7 +109,7 @@ impl SourceCode for MietteSourceCode<'_> { | |||
_cm: self.0, | |||
data: src, | |||
span: convert_span(span), | |||
line: loc.line, | |||
line: loc.line - 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use saturating_sub
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update/merge this PR as this is required for other PRs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swc-bump:
- swc_error_reporters
Description:
This fixes issue #4081 by starting line number at 0 instead of 1 since Miette increments the line.
Related issue (if exists):
Closes #4081