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

[Bug]: eval- based source maps generate broken build on some systems #8710

Open
cgarwood opened this issue Dec 15, 2024 · 0 comments
Open

[Bug]: eval- based source maps generate broken build on some systems #8710

cgarwood opened this issue Dec 15, 2024 · 0 comments
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@cgarwood
Copy link

System Info

vscode ➜ /workspaces/frontend (dev) $ npx envinfo --system --npmPackages '@rspack/*' --binaries --browser

  System:
    OS: Linux 6.8 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (4) x64 Common KVM processor
    Memory: 3.13 GB / 11.68 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 20.18.1 - /usr/local/share/nvm/versions/node/v20.18.1/bin/node
    Yarn: 4.5.3 - /usr/bin/yarn
    npm: 10.8.2 - /usr/local/share/nvm/versions/node/v20.18.1/bin/npm
  npmPackages:
    @rspack/cli: 1.1.6 => 1.1.6 
    @rspack/core: 1.1.6 => 1.1.6 

Details

Developing on an Ubuntu system, I'm getting broken builds when using eval- based options for the devtool source maps. Same issue on Ubuntu 20, 22, and on a VSCode devcontainer hosted on both systems. Tested across two VMs (one running Ubuntu 20.04, another VM running Ubuntu 24.04)

Interestingly enough, the exact same code, run in a VSCode devcontainer on a Windows system builds OK with the eval- options.

For example:
devtool: "cheap-module-source-map" works fine
devtool: "eval-cheap-module-source-map" generates a broken build.

Broken builds are typically failing with an error about const variables being redeclared.

A diff for one of the main files in the build matches between the Windows and Ubuntu machines with non-eval source maps.
A diff for the same file between both machines using eval- source maps generates a pretty significant diff, but I'm not well enough versed to be able to parse it enough to tell what's going on.

home-assistant/frontend#23231 has more information on the issue I'm seeing and contains the diff files.

Reproduce link

https://github.com/home-assistant/frontend

Reproduce Steps

Looks like something that may be difficult to reproduce as nobody else working on the Home Assistant project has been able to reproduce it.

https://developers.home-assistant.io/docs/frontend/development has details for the Home Assistant project and setting up a full development environment. It's a little tricky as you need both the Python backend as well as the frontend repository.

@cgarwood cgarwood added bug Something isn't working pending triage The issue/PR is currently untouched. labels Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.
Projects
None yet
Development

No branches or pull requests

1 participant