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

turbo: 1.13.2 -> 2.0.11; modernize; adopt #328295

Merged
merged 7 commits into from
Aug 10, 2024

Conversation

getchoo
Copy link
Member

@getchoo getchoo commented Jul 18, 2024

Description of changes

Fixes #330110

Changelog: https://github.com/vercel/turbo/releases/tag/v2.0.7
Diff: vercel/turborepo@v1.13.2...v2.0.7

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.

@idlip
Copy link
Contributor

idlip commented Jul 19, 2024

@getchoo Bro wrong person, I'm still newbie. I don't have any idea on this.

Edit: It was supposed to be @dlip (you added 'i' lol)

@getchoo
Copy link
Member Author

getchoo commented Jul 19, 2024

sorry about that 😆

@dlip
Copy link
Contributor

dlip commented Jul 20, 2024

It ran fine on nixos, but for some reason i get this error on macos:

...
calling 'envHostTargetHook' function hook 'sdkRootHook' /nix/store/gps9qrh99j7g02840wv5x78ykmz30byp-strip.sh
calling 'envHostTargetHook' function hook 'sdkRootHook' /nix/store/04w1mgkhawycg64s4q3n8mkcvma5ppx0-apple-framework-CoreFoundation-11.0.0
calling 'envHostTargetHook' function hook 'sdkRootHook' /nix/store/lybzq28v1ay0zac24hp0pw38s76ijvsj-libobjc-11.0.0
error: hash mismatch in fixed-output derivation '/nix/store/57ldd54hk873ydf9llh4vrc5aa58xbqj-source.drv':
         specified: sha256-kfJlfwMu7PCnSLefSa3JEDkwEFCHKhVuST0YIdL+6ps=
            got:    sha256-vQNXNA3jO7lBDbNI39CoLhlQQdpNt+N4KwBY0pT/CwU=
error: 1 dependencies of derivation '/nix/store/1x6fbrpw01mc440apgv3rgwxg0z028bq-turbo-unwrapped-2.0.7.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dncp1vsyxifq2q1bkpj9x60qs4n1mjv9-turbo-2.0.7.drv' failed to build

@getchoo getchoo force-pushed the pkgs/turbo/2.0.7 branch from 0bc4da4 to 60b950a Compare July 28, 2024 04:09
@getchoo
Copy link
Member Author

getchoo commented Jul 28, 2024

It ran fine on nixos, but for some reason i get this error on macos:

Hopefully this update fixes it. Not sure what happened there

@getchoo getchoo force-pushed the pkgs/turbo/2.0.7 branch from 60b950a to 0653679 Compare July 28, 2024 04:14
@ofborg ofborg bot requested a review from dlip July 28, 2024 05:29
@getchoo getchoo changed the title turbo: 1.13.2 -> 2.0.7; modernize; adopt turbo: 1.13.2 -> 2.0.9; modernize; adopt Jul 28, 2024
@getchoo getchoo requested a review from xzfc July 28, 2024 21:36
@dlip
Copy link
Contributor

dlip commented Jul 29, 2024

Just tried on Mac again, it seems like the hash changed again? Is this just me or are Vercel moving the tag? Also mac doesn't like autoPatchelfHook

diff --git a/pkgs/by-name/tu/turbo-unwrapped/package.nix b/pkgs/by-name/tu/turbo-unwrapped/package.nix
index f8f671a5cf38..33cb3228110b 100644
--- a/pkgs/by-name/tu/turbo-unwrapped/package.nix
+++ b/pkgs/by-name/tu/turbo-unwrapped/package.nix
@@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec {
     owner = "vercel";
     repo = "turbo";
     rev = "v${version}";
-    hash = "sha256-hthuKGbHKTcv/wDIw9Ltcwl6jXWLhsCyqC76+vQyC5U=";
+    hash = "sha256-lKKU4jzT6ab9Kc8bh3FXpEQ1TEzp7qUca74qyYz5OkY=";
   };
 
   patches = [
@@ -43,14 +43,13 @@ rustPlatform.buildRustPackage rec {
 
   nativeBuildInputs =
     [
-      autoPatchelfHook
       capnproto
       extra-cmake-modules
       pkg-config
       protobuf
     ]
     # https://github.com/vercel/turbo/blob/ea740706e0592b3906ab34c7cfa1768daafc2a84/CONTRIBUTING.md#linux-dependencies
-    ++ lib.optional stdenv.isLinux lld;
+    ++ lib.optional stdenv.isLinux [lld autoPatchelfHook];
 
   buildInputs =
     [

@Atemu
Copy link
Member

Atemu commented Jul 29, 2024

stdenv.hostPlatform.isElf is the check you want here.

If upstream is moving tags (shame, shame, shame), please ask them to stop doing that and, as a workaround, use a git revision rather than a tag ref and add a comment why that's necessary.

@getchoo
Copy link
Member Author

getchoo commented Aug 2, 2024

Is this just me or are Vercel moving the tag?

This doesn't seem to be the case. Fetching the source on Linux again works as expected on my end, and it appears to happen in these ofborg runs. Maybe there's some non-determinism on MacOS that causes the output to differ...? I'm really at a loss here

@Atemu
Copy link
Member

Atemu commented Aug 2, 2024

If I read it correctly, it's the vendor dir, not the source.

@getchoo
Copy link
Member Author

getchoo commented Aug 2, 2024

We don't have a vendor dir, we vendor the Cargo.lock

From the x86_64-darwin log

error: hash mismatch in fixed-output derivation '/nix/store/k87bba001mi8kb491xjrfdw3aq5mdx9x-source.drv':
         specified: sha256-hthuKGbHKTcv/wDIw9Ltcwl6jXWLhsCyqC76+vQyC5U=
            got:    sha256-lKKU4jzT6ab9Kc8bh3FXpEQ1TEzp7qUca74qyYz5OkY=

sha256-hthuKGbHKTcv/wDIw9Ltcwl6jXWLhsCyqC76+vQyC5U= matches the hash specified for the source here

Copy link
Contributor

@dlip dlip left a comment

Choose a reason for hiding this comment

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

LGTM works on mac and linux! 👏

@getchoo getchoo added 12.approvals: 1 This PR was reviewed and approved by one reputable person 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package labels Aug 3, 2024
@pbsbot
Copy link

pbsbot commented Aug 4, 2024

Result of nixpkgs-review pr 328295 run on x86_64-linux 1

2 packages built:
  • turbo
  • turbo-unwrapped

@wegank wegank added 12.approvals: 2 This PR was reviewed and approved by two reputable people and removed 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Aug 4, 2024
Copy link
Member

@Atemu Atemu left a comment

Choose a reason for hiding this comment

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

Diff LGTM apart from this

pkgs/by-name/tu/turbo-unwrapped/package.nix Outdated Show resolved Hide resolved
@wegank wegank added 12.approvals: 3+ This PR was reviewed and approved by three or more reputable people and removed 12.approvals: 2 This PR was reviewed and approved by two reputable people labels Aug 5, 2024
@alyssais alyssais added the awaiting_changes (old Marvin label, do not use) label Aug 6, 2024
@getchoo getchoo removed 12.approvals: 3+ This PR was reviewed and approved by three or more reputable people 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package labels Aug 10, 2024
@getchoo getchoo requested review from Atemu, dlip and pbsds August 10, 2024 02:50
Functionally this:

- Reduces occurrences of NixOS#208242
- Improve meta-attributes
- Fixes the meta-attributes of the wrapper
- Uses the preferred binary wrapper
- Runs the version test against the wrapper to ensure flags & dlopen
  calls work
@getchoo getchoo requested a review from Atemu August 10, 2024 06:43
@getchoo getchoo removed the awaiting_changes (old Marvin label, do not use) label Aug 10, 2024
Copy link
Member

@Atemu Atemu left a comment

Choose a reason for hiding this comment

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

Result of nixpkgs-review pr 328295 run on x86_64-linux 1

2 packages built:
  • turbo
  • turbo-unwrapped

@Atemu Atemu merged commit 676fcba into NixOS:master Aug 10, 2024
25 of 27 checks passed
@getchoo getchoo deleted the pkgs/turbo/2.0.7 branch August 13, 2024 01:03
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.

Documentation: turbo now uses MIT license instead of MPL
9 participants