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

quickwit: fix compilation with rust 1.80 #345219

Merged
merged 1 commit into from
Sep 29, 2024
Merged

Conversation

zimward
Copy link
Contributor

@zimward zimward commented Sep 29, 2024

Description of changes

Cargo.lock has been patched to update the time crate and its dependencies to version 0.3.36 to fix the failing build with rust 1.80 (#332957).

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need the patch here, we can just update the lock file directly

Copy link
Contributor Author

@zimward zimward Sep 29, 2024

Choose a reason for hiding this comment

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

i tried to do so first but it then failed stating something along the lines of "mismatch between source Cargo.lock and provided Cargo.lock"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is the exact error message:

Validating consistency between /build/source/quickwit/Cargo.lock and /build/cargo-vendor-dir/Cargo.lock
8228c8228
< version = "0.3.34"
---
> version = "0.3.36"
8230c8230
< checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
---
> checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
8261c8261
< version = "0.2.17"
---
> version = "0.2.18"
8263c8263
< checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"
---
> checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"

ERROR: cargoHash or cargoSha256 is out of date

Cargo.lock is not the same in /build/cargo-vendor-dir

To fix the issue:
1. Set cargoHash/cargoSha256 to an empty string: `cargoHash = "";`
2. Build the derivation and wait for it to fail with a hash mismatch
3. Copy the "got: sha256-..." value back into the cargoHash field
   You should have: cargoHash = "sha256-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=";

Copy link
Member

Choose a reason for hiding this comment

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

🤔 I think I had a similar problem when fixing wezterm. I think it got suggested to me to copy the already vendored Cargo.lock in postPatch to the normal location.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will look into it. Thanks for the pointer.

@happysalada happysalada merged commit 00b7da6 into NixOS:master Sep 29, 2024
30 checks passed
@zimward zimward deleted the quickwit branch September 29, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants