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 source map line offsets #2791

Merged
merged 5 commits into from
May 5, 2023
Merged

Conversation

dylan-conway
Copy link
Collaborator

No description provided.

@@ -356,17 +356,15 @@ pub const LineColumnOffset = struct {
std.debug.assert(i >= offset);
std.debug.assert(i < input.len);

offset = i + 1;
var iter = strings.CodepointIterator.initOffset(input, i);
var cp = iter.nextCodepoint();
Copy link
Collaborator

Choose a reason for hiding this comment

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

you can't use Cursor? We should clean up this code, but it was done this way because there were off-by-one errors when using .next() because the offset was updated after use when usually you want the previous value

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

switched back to Cursor. Should we change Cursor.i to a usize?

@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2023

@dylan-conway 24 files with test failures on bun-darwin-x64-baseline:

  • test/bundler/bundler_browser.test.ts
  • test/bundler/bundler_cjs2esm.test.ts
  • test/bundler/bundler_edgecase.test.ts
  • test/bundler/bundler_jsx.test.ts
  • test/bundler/bundler_plugin.test.ts
  • test/bundler/esbuild/dce.test.ts
  • test/bundler/esbuild/default.test.ts
  • test/bundler/esbuild/importstar.test.ts
  • test/bundler/esbuild/loader.test.ts
  • test/bundler/esbuild/packagejson.test.ts
  • test/bundler/esbuild/splitting.test.ts
  • test/bundler/esbuild/ts.test.ts
  • test/cli/run/preload-test.test.js
  • test/js/bun/http/serve.test.ts
  • test/js/bun/plugin/plugins.test.ts
  • test/js/bun/resolve/png/test-png-import.test.js
  • test/js/bun/sqlite/sqlite.test.js
  • test/js/bun/test/preload-test.test.js
  • test/js/bun/test/snapshot-tests/snapshots/more-snapshots/different-directory.test.ts
  • test/js/bun/test/snapshot-tests/snapshots/more.test.ts
  • test/js/bun/test/snapshot-tests/snapshots/snapshot.test.ts
  • test/js/node/child_process/child_process-node.test.js
  • test/js/node/readline/readline.node.test.ts
  • test/transpiler/transpiler.test.js

View test output

#c5dc7f9e31b5a2842fd27648ab18ce64c97aed47

@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2023

@dylan-conway 22 files with test failures on linux-x64-baseline:

  • test/bundler/bundler_browser.test.ts
  • test/bundler/bundler_cjs2esm.test.ts
  • test/bundler/bundler_edgecase.test.ts
  • test/bundler/bundler_jsx.test.ts
  • test/bundler/bundler_plugin.test.ts
  • test/bundler/esbuild/dce.test.ts
  • test/bundler/esbuild/default.test.ts
  • test/bundler/esbuild/importstar.test.ts
  • test/bundler/esbuild/loader.test.ts
  • test/bundler/esbuild/splitting.test.ts
  • test/bundler/esbuild/ts.test.ts
  • test/cli/run/preload-test.test.js
  • test/js/bun/http/serve.test.ts
  • test/js/bun/plugin/plugins.test.ts
  • test/js/bun/resolve/png/test-png-import.test.js
  • test/js/bun/test/preload-test.test.js
  • test/js/bun/test/snapshot-tests/snapshots/more-snapshots/different-directory.test.ts
  • test/js/bun/test/snapshot-tests/snapshots/more.test.ts
  • test/js/bun/test/snapshot-tests/snapshots/snapshot.test.ts
  • test/js/node/child_process/child_process-node.test.js
  • test/js/node/readline/readline.node.test.ts
  • test/transpiler/transpiler.test.js

View test output

#c5dc7f9e31b5a2842fd27648ab18ce64c97aed47

@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2023

@dylan-conway 22 files with test failures on linux-x64:

  • test/bundler/bundler_browser.test.ts
  • test/bundler/bundler_cjs2esm.test.ts
  • test/bundler/bundler_edgecase.test.ts
  • test/bundler/bundler_jsx.test.ts
  • test/bundler/bundler_plugin.test.ts
  • test/bundler/esbuild/dce.test.ts
  • test/bundler/esbuild/default.test.ts
  • test/bundler/esbuild/importstar.test.ts
  • test/bundler/esbuild/loader.test.ts
  • test/bundler/esbuild/splitting.test.ts
  • test/bundler/esbuild/ts.test.ts
  • test/cli/run/preload-test.test.js
  • test/js/bun/http/serve.test.ts
  • test/js/bun/plugin/plugins.test.ts
  • test/js/bun/resolve/png/test-png-import.test.js
  • test/js/bun/test/preload-test.test.js
  • test/js/bun/test/snapshot-tests/snapshots/more-snapshots/different-directory.test.ts
  • test/js/bun/test/snapshot-tests/snapshots/more.test.ts
  • test/js/bun/test/snapshot-tests/snapshots/snapshot.test.ts
  • test/js/node/child_process/child_process-node.test.js
  • test/js/node/readline/readline.node.test.ts
  • test/transpiler/transpiler.test.js

View test output

#c5dc7f9e31b5a2842fd27648ab18ce64c97aed47

@Jarred-Sumner Jarred-Sumner merged commit d9386a6 into main May 5, 2023
@Jarred-Sumner Jarred-Sumner deleted the dylan/fix-source-map-line-offsets branch May 5, 2023 05:44
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.

2 participants