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

[staging] perl: 5.38.2 -> 5.40.0 #333286

Merged
merged 24 commits into from
Sep 12, 2024
Merged

[staging] perl: 5.38.2 -> 5.40.0 #333286

merged 24 commits into from
Sep 12, 2024

Conversation

stigtsp
Copy link
Member

@stigtsp stigtsp commented Aug 8, 2024

Hydra Jobset: https://hydra.nixos.org/jobset/nixpkgs/perl-updates

  • Update perl to 5.40.0
  • Update perl-cross to 1.6
  • Remove perl536
  • Update cross and no-sys-dirs patches
  • Fix for Build failure: pkgsStatic.perl (Perl interpreter statically linked to Musl libc) #295608 from @tobim
  • ⚠️ Set enableParallelBuilding=false as unicore/mktables step apparently consumes a lot of resources with large parallel builds, causing the build to fail sometimes
  • ⚠️ Use perl538 in stdenv/linux/default.nix since perl540 fails to build in stage1
  • Updates to other packages:
    • macvim: 178 -> 179, perl536 -> perl540
    • unit: add nixos tests for perl, clean up withPerl arguments
    • perlPackages.AuthenModAuthPubTkt: disable unstable test
    • perlPackages.CGICompile: disable unstable test
    • perlPackages.ApacheDB: mark as broken
    • perlPackages.MouseXGetOpt: remove failing tests to fix build
    • perlPackages.EncodeIMAPUTF7: patch to fix build with 540
    • perlPackages.XSParseKeyword: 0.38 -> 0.44
    • perlPackages.ObjectPad: 0.804 -> 0.809
    • perlPackages.TextLayout: 0.031 -> 0.037
    • perlPackages.FileLoadLines: 1.021 -> 1.046
    • perlPackages.MooseXGetopt: 0.75 -> 0.76
    • perlPackages.DevelSize: 0.83 -> 0.84
    • perlPackages.CodeTidyAll: 0.83 -> 0.84
    • perlPackages.AppMusicChordPro: 6.030 -> 6.050.7
    • perlPackages.po4a: 0.71 -> 0.73
    • perlPackages.GetoptLongDescriptive: 0.111 -> 0.114
    • perlPackages.BKeywords: 1.26 -> 1.27

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: stdenv Standard environment label Aug 8, 2024
@stigtsp stigtsp force-pushed the perl-updates branch 3 times, most recently from 08e0920 to bfd04de Compare August 8, 2024 21:42
@tobim
Copy link
Contributor

tobim commented Sep 1, 2024

I opened #338838 targetting this PR to fix #295608.

@stigtsp stigtsp force-pushed the perl-updates branch 2 times, most recently from 93fbf32 to 6cc4272 Compare September 7, 2024 12:42
Only provide one `withPerl` argument instead of one per perl version
provided by nixpkgs.
@github-actions github-actions bot added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Sep 8, 2024
@stigtsp stigtsp marked this pull request as ready for review September 8, 2024 18:12
@stigtsp stigtsp requested a review from tobim September 8, 2024 18:16
Copy link
Contributor

@marcusramberg marcusramberg left a comment

Choose a reason for hiding this comment

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

LGTM!

@stigtsp stigtsp mentioned this pull request Sep 9, 2024
13 tasks
@philiptaron
Copy link
Contributor

Barring any objections, I'd like to merge this in the next day or so.


- my @other = blessed($other) ? $other : @$other;
+ eval 'require Scalar::Util';
+ my @other = unless($@){
Copy link
Member Author

Choose a reason for hiding this comment

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

@marcusramberg Hm, just came across this part - which seems broken? It's also in the original cross.patch tho..

@Atemu
Copy link
Member

Atemu commented Sep 11, 2024

⚠️ Set enableParallelBuilding=false as unicore/mktables step apparently consumes a lot of resources with large parallel builds, causing the build to fail sometimes

I don't like the idea of disabling parallelism because people spec their hardware disproportionally and/or configure their nix-daemon wrong. That should be reserved for cases where the build system has an actual bug due to parallelism that is independent of the build host.

IIRC Make has a feature to limit the maximum load it can put on the system. Couldn't this be used instead?
There are stalled plans to make this available as a first-class Nix sandbox setting similar to NIX_BUILD_CORES but there's no reason we couldn't just set this to some reasonable value in the meantime.

@stigtsp
Copy link
Member Author

stigtsp commented Sep 12, 2024

@Atemu I've tested building by setting a max value for $NIX_BUILD_CORES to 8, this appears to work, but needs to be tested a bit more with cross and static build. Does this seem like a reasonable implementation?

diff --git a/pkgs/development/interpreters/perl/interpreter.nix b/pkgs/development/interpreters/perl/interpreter.nix
index b95adaf8287d..20364a145925 100644
--- a/pkgs/development/interpreters/perl/interpreter.nix
+++ b/pkgs/development/interpreters/perl/interpreter.nix
@@ -148,7 +148,7 @@ stdenv.mkDerivation (rec {

   dontAddPrefix = !crossCompiling;

-  enableParallelBuilding = false;
+  enableParallelBuilding = true;

   # perl includes the build date, the uname of the build system and the
   # username of the build user in some files.
@@ -210,6 +210,18 @@ stdenv.mkDerivation (rec {
       perlOnTargetForTarget = if lib.hasAttr perlAttr pkgsTargetTarget then (override pkgsTargetTarget.${perlAttr}) else { };
     };

+  buildPhase = ''
+    runHook preBuild
+
+    if (( $NIX_BUILD_CORES > 8)); then
+      NIX_BUILD_CORES=8
+    fi
+
+    make -j$NIX_BUILD_CORES
+
+    runHook postBuild
+  '';
+
   doCheck = false; # some tests fail, expensive

   # TODO: it seems like absolute paths to some coreutils is required.

@philiptaron philiptaron merged commit e630216 into staging Sep 12, 2024
73 of 74 checks passed
@alyssais alyssais deleted the perl-updates branch September 13, 2024 09:32
@alyssais alyssais restored the perl-updates branch September 13, 2024 13:04
@alyssais
Copy link
Member

alyssais commented Sep 13, 2024

What was the hurry with merging this while there was discussion ongoing? We're still in the middle of staging-next-24.05, so this could absolutely have waited a couple of days to let the discussion play out. "Barring any objections" didn't seem to mean very much…

@Atemu
Copy link
Member

Atemu commented Sep 13, 2024

While I'd prefer the issue of parallel builds to be discussed, it's a minor issue all things considered; we can live with single-threaded perl builds for a staging cycle or two.

@alyssais
Copy link
Member

I agree that it's not a big deal. Just seemed odd to me to merge it while discussion was still happening when the next staging cycle won't start for days anyway.

@philiptaron
Copy link
Contributor

In the commit message, I wrote this:

After discussing on Matrix in the #staging room, I'm merging this as-is without waiting for changes to the enableParallelBuilding = false; line.

There are several in-the-wings PRs (notably one from @emilazy) that attempt to bring load-limit, which is a more sensible accounting of the work that a derivation is doing, into Nix itself. If and when that lands, we'll be able to just set enableParallelBuilding = true; again, without any specific casing around the NIX_BUILD_CORES stdenv variable.

I'm realizing that this message is not surfaced in the PR or that discoverable other than by hovering over the hash, so I'm committing to writing something on a PR if I do a merge commit message like that again.


More generally, I'd like be part of the solution to a problem many, many, many contributors to Nixpkgs say they have: they don't know where the "finish line" is for merging their PR, and which feedback is blocking and which is just a general discussion or dissatisfaction about the state of the world.

And so as a result as their limited capacity for discussion, or to keep up with the tax of keeping a PR fresh, many excellent contributions have died on the vine, despite no one in the PR process actually deciding to block the PR for a specific reason.

That's not a worry here. Perl 5.40 is going to happen one way or another. So making this be the place to make a stand isn't the wisest decision I've ever made...

What I'd like to do is help us, the collective who keeps Nixpkgs humming, become better about crisply stating objections by making an ask to contributors to do that and, failing to hear objections that state that they block the PR, merging it.

I'm very open to feedback about how I do this, about the length of time for a debate or waiting for contributors to have their say. Definitely going to get this wrong some of the time.

I'm much less open to practices that end up contributing to a culture of endless debate without clear messages like "I oppose merging this PR because it does XYZ, and XYZ shouldn't be done." The request changes button is right there, it's useful to ask people to click it when needed, otherwise, let's merge and iterate.

Again, definitely might have gotten that wrong in this case. Based on @Atemu's message above, it sounds like they didn't consider their feedback blocking, so I do feel like it's a fair move to merge, but I am open to feedback about how I ought to behave in the future.

@Atemu
Copy link
Member

Atemu commented Sep 14, 2024

Btw, we don't need to wait for the load limit PR to land. That PR is only about adding generic support that can be used tree-wide in a manner that fits all users.

We can just set a load limit to a constant relative to the available CPU resources here right now and it'd be merely slightly suboptimal at worst in some edge-cases. A hellofalot better than disabling paralellism outright.

@emilazy
Copy link
Member

emilazy commented Sep 14, 2024

Load limits were dropped across the board in #192447 because they make things worse for Hydra. I think patchwork solutions here are probably not a great fix, since it’s hard to pick a value that works well for a wide variety of systems, and since load limit looks at the total system load, not the load actually being used by a build.

FWIW I support just enabling the parallel build again here in a separate PR since it doesn’t cause issues for Hydra and there are local workarounds.

@alyssais
Copy link
Member

More generally, I'd like be part of the solution to a problem many, many, many contributors to Nixpkgs say they have: they don't know where the "finish line" is for merging their PR, and which feedback is blocking and which is just a general discussion or dissatisfaction about the state of the world.

And so as a result as their limited capacity for discussion, or to keep up with the tax of keeping a PR fresh, many excellent contributions have died on the vine, despite no one in the PR process actually deciding to block the PR for a specific reason.

That's not a worry here. Perl 5.40 is going to happen one way or another. So making this be the place to make a stand isn't the wisest decision I've ever made...

Yeah, I think that's exactly it. This is a great attitude to have — it just didn't really apply here. All I'd have liked to see being different was waiting a few days, since it's a staging PR anyway so all that matters is that it catches the next cycle.

@Atemu
Copy link
Member

Atemu commented Sep 14, 2024

@emilazy my point is that disabling parallelism entirely is even worse for hydra.

Making this tunable is only required for enabling load limits globally. It is not a requirement for applying it in targeted cases like this one.

@trofi
Copy link
Contributor

trofi commented Sep 15, 2024

perl536 attribute removal has a small perlInterpreters eval fallout. Attempting to fix it as:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: stdenv Standard environment 6.topic: vim 8.has: clean-up 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ 10.rebuild-darwin: 5001+ 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild 10.rebuild-linux: 501+ 10.rebuild-linux: 5001+ 10.rebuild-linux-stdenv This PR causes stdenv to rebuild
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants