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

First source mapping is missing #4608

Closed
mischnic opened this issue May 10, 2022 · 3 comments · Fixed by #4616
Closed

First source mapping is missing #4608

mischnic opened this issue May 10, 2022 · 3 comments · Fixed by #4616
Assignees
Labels
Milestone

Comments

@mischnic
Copy link
Contributor

Describe the bug

It looks like the first mapping in the source map is missing.

I'm seeing this problem both for the npm packages as well as with the crates

Input code

console.log();
console.log();

Config

No response

Playground link

No response

Expected behavior

There's a mapping for console -> console on the first line as there is on the second line.

Actual behavior

https://evanw.github.io/source-map-visualization/#NjQAY29uc29sZS5sb2coKTsKY29uc29sZS5sb2coKTsKCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWluZGV4LmpzLm1hcDE5MAB7InZlcnNpb24iOjMsInNvdXJjZXMiOlsiLi4vaW5kZXguanMiXSwic291cmNlc0NvbnRlbnQiOlsiY29uc29sZS5sb2coKTtcbmNvbnNvbGUubG9nKCk7XG4iXSwibmFtZXMiOlsibG9nIiwiY29uc29sZSJdLCJtYXBwaW5ncyI6Ik9BQU8sQ0FBQ0EsR0FBRyxFQUFFLENBQUM7QUFDZEMsT0FBTyxDQUFDRCxHQUFHLEVBQUUsQ0FBQyJ9

Bildschirmfoto 2022-05-10 um 21 59 04

Version

1.2.181

Additional context

No response

@mischnic mischnic added the C-bug label May 10, 2022
@mischnic mischnic changed the title First source mapping is missing? First source mapping is missing May 10, 2022
@kdy1
Copy link
Member

kdy1 commented May 11, 2022

Seems like caused by a PR for removing dummy comments by @0xe
I'll fix this issue by reserving BytePos(0) for dummy purpose and shifting all bytepos by 1

@kdy1 kdy1 added this to the Planned milestone May 11, 2022
@kdy1 kdy1 self-assigned this May 11, 2022
@mischnic
Copy link
Contributor Author

mischnic commented May 11, 2022

Thanks!

But 9780834 has bumped the version on some packages that didn't actually get published. Works now

@kdy1 kdy1 modified the milestones: Planned, v1.2.183 May 12, 2022
@swc-bot
Copy link
Collaborator

swc-bot commented Oct 16, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

3 participants