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

esbuild output with preserveSymlinks = false contains machine-specific relative paths #66

Open
jfirebaugh opened this issue Sep 6, 2022 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@jfirebaugh
Copy link

Originally reported in #32 (comment):

Another problem with preserveSymlinks = false for our needs in Bazel is that ESBuild leaves comments in the output that contain resolved file paths. With preserveSymlinks = false these can refer to paths like .../home/matt/.cache/bazel_matt/.../.../... which, across different users and checkouts, will generate downstream cache misses on actions that depend on the outputs.

At Figma we encountered this issue with a write_source_files target that writes an esbuild bundle. The associated diff_test fails with rules_esbuild 0.12+ because the generated relative path differs between local development and CI.

@cgrindel cgrindel added bug Something isn't working need: discussion labels Sep 27, 2022
@cgrindel
Copy link
Contributor

cgrindel commented Oct 4, 2022

Related to #58.

@gregmagolan gregmagolan moved this to 🔖 Ready in Open Source Feb 6, 2023
@gregmagolan gregmagolan added this to the 1.0 milestone Mar 27, 2023
@alexeagle
Copy link
Member

As a workaround, you could write another rule after the esbuild to sanitize paths in the file before passing it to write_source_files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: On Deck
Development

No branches or pull requests

4 participants