zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.15k stars 3.08k forks source link

0.159.5: [ERROR] encountered 23 errors resolving licenses, unable to generate output #19971

Open bbigras opened 2 weeks ago

bbigras commented 2 weeks ago

Check for existing issues

Describe the bug / provide steps to reproduce it

While trying to build 0.159.5 on nixos, I get:

error: unable to synthesize license expression for 'pet 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-conda 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-core 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-env-var-path 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-fs 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-global-virtualenvs 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-homebrew 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-jsonrpc 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-linux-global-python 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-mac-commandlinetools 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-mac-python-org 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-mac-xcode 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-pipenv 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-poetry 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-pyenv 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-python-utils 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-reporter 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-telemetry 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-venv 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-virtualenv 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-virtualenvwrapper 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-windows-registry 0.1.0': no `license` specified, and no license files were found

error: unable to synthesize license expression for 'pet-windows-store 0.1.0': no `license` specified, and no license files were found

2024-10-30 17:47:15.748950005 +00:00:00 [ERROR] encountered 23 errors resolving licenses, unable to generate output
error: builder for '/nix/store/w1chfvxc1xqw56ckhsakkn2x1928fap9-zed-editor-0.159.5.drv' failed with exit code 1;
       last 25 log lines:
       > error: unable to synthesize license expression for 'pet-mac-xcode 0.1.0': no `license` specified, and no license files were found
       >
       > error: unable to synthesize license expression for 'pet-pipenv 0.1.0': no `license` specified, and no license files were found
       >
       > error: unable to synthesize license expression for 'pet-poetry 0.1.0': no `license` specified, and no license files were found
       >
       > error: unable to synthesize license expression for 'pet-pyenv 0.1.0': no `license` specified, and no license files were found
       >
       > error: unable to synthesize license expression for 'pet-python-utils 0.1.0': no `license` specified, and no license files were found
       >
       > error: unable to synthesize license expression for 'pet-reporter 0.1.0': no `license` specified, and no license files were found
       >
       > error: unable to synthesize license expression for 'pet-telemetry 0.1.0': no `license` specified, and no license files were found
       >
       > error: unable to synthesize license expression for 'pet-venv 0.1.0': no `license` specified, and no license files were found
       >
       > error: unable to synthesize license expression for 'pet-virtualenv 0.1.0': no `license` specified, and no license files were found
       >
       > error: unable to synthesize license expression for 'pet-virtualenvwrapper 0.1.0': no `license` specified, and no license files were found
       >
       > error: unable to synthesize license expression for 'pet-windows-registry 0.1.0': no `license` specified, and no license files were found
       >
       > error: unable to synthesize license expression for 'pet-windows-store 0.1.0': no `license` specified, and no license files were found
       >
       > 2024-10-30 17:47:15.748950005 +00:00:00 [ERROR] encountered 23 errors resolving licenses, unable to generate output
       For full logs, run 'nix log /nix/store/w1chfvxc1xqw56ckhsakkn2x1928fap9-zed-editor-0.159.5.drv'.

Environment

Zed: v0.158.2 (Zed) OS: Linux Wayland nixos 24.11 Memory: 31.1 GiB Architecture: x86_64 GPU: AMD Radeon RX 6700 XT (RADV NAVI22) || radv || Mesa 24.2.4

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log


PedroHLC commented 2 weeks ago

Cc @osiewicz who added the dependency back at #19576

Note: the error happens when running https://github.com/zed-industries/zed/blob/main/script/generate-licenses

osiewicz commented 2 weeks ago

The script does pass locally for me as well as on CI, so I'm not sure what's up.

niklaskorz commented 2 weeks ago

Nixpkgs uses a newer version of cargo-about (0.6.4) than what's installed by generate-licenses (0.6.1), that's the only difference on top of my mind

niklaskorz commented 2 weeks ago

Use the allowBroken option If the license information of these packages is not important, you can use the allowBroken option when building Nix to ignore these errors. You can add the --allow-broken parameter to the command line, or set it in the Nix configuration:

nixpkgs.config.allowBroken = true;

In addition, homebrew is not very friendly to Mac. You can choose Servbay to try, which is more professional than homebrew on Mac

None of that is relevant to the issue at hand

niklaskorz commented 2 weeks ago

Nixpkgs uses a newer version of cargo-about (0.6.4) than what's installed by generate-licenses (0.6.1), that's the only difference on top of my mind

That doesn't seem to be it, running generate-licenses with cargo-about 0.6.4 outside of Nix works fine. Instead, it looks like the problem is cargo-about trying to fetch the LICENSE file directly from the crate's respective git repository, which it cannot do in an isolated (network-less) build environment. I wonder why it attempts to do so at all though, as the license for these crates is already specified in zed-licenses.toml.

Upstream issue: https://github.com/EmbarkStudios/cargo-about/issues/246