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

Update to Nixpkgs 24.05 #10835

Merged
merged 18 commits into from
Jun 5, 2024
Merged

Conversation

roberth
Copy link
Member

@roberth roberth commented Jun 3, 2024

Description

Update Nixpkgs to 24.05. Support for building with "plain" 23.11 dependencies is dropped, because of the bdw-gc 8.2.4 requirement.

Context

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@roberth roberth requested a review from edolstra as a code owner June 3, 2024 14:09
@roberth roberth changed the title Update nixpkgs 24.05 Update to Nixpkgs 24.05 Jun 3, 2024
roberth added 7 commits June 3, 2024 16:37
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/b550fe4b4776908ac2a861124307045f8e717c8e' (2024-02-28)
  → 'github:NixOS/nixpkgs/88dca77be222aedd1f47d2cf0942dffefee76216' (2024-06-03)
Manually tested by printing to stderr in both branches (sp in os
stack, or not), and triggering a GC in a filterSource function,
e.g.:

    let
      generateTree = n: if n == 0 then "ha" else { left = generateTree (n - 1); right = generateTree (n - 1); };
    in
      builtins.deepSeq (generateTree 18) ...

Note that the darwin still uses the strategy of disabling GC, despite
having an implementation that compiles. The proper solution will be
enabled and tested later.
This re-enables support for older bwdgc versions without complicating
the code too much.
Coroutines generally only interfere with GC during source filtering,
so it's not too bad of a regression on older bdwgc.
This seems preferable over conditional compilation to enable the patch
etc; we've already spent a lot of complexity budget on this GC-coroutine
interaction...
Nixpkgs has reshuffled its Nix versions.
@roberth roberth force-pushed the update-nixpkgs-24.05 branch from ec330b6 to 6067525 Compare June 3, 2024 14:37
@roberth roberth force-pushed the update-nixpkgs-24.05 branch from da6244b to 8a510f4 Compare June 3, 2024 15:35
@roberth roberth marked this pull request as draft June 3, 2024 16:10
@github-actions github-actions bot added the c api Nix as a C library with a stable interface label Jun 3, 2024
@roberth roberth force-pushed the update-nixpkgs-24.05 branch from b7c6cee to d47d9c5 Compare June 3, 2024 16:39
@roberth roberth force-pushed the update-nixpkgs-24.05 branch from d47d9c5 to 5d460d5 Compare June 3, 2024 16:47
@Ericson2314
Copy link
Member

Ericson2314 commented Jun 3, 2024

diff --git a/flake.nix b/flake.nix
index a146079f4..5dbc554fc 100644
--- a/flake.nix
+++ b/flake.nix
@@ -46,6 +46,7 @@
         "armv7l-unknown-linux-gnueabihf"
         "riscv64-unknown-linux-gnu"
         "x86_64-unknown-netbsd"
+        "x86_64-unknown-freebsd"
         "x86_64-w64-mingw32"
       ];

diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 1eb60a1b8..7c676829e 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -31,7 +31,6 @@
 #include <sstream>
 #include <cstring>
 #include <optional>
-#include <pthread.h>
 #include <unistd.h>
 #include <sys/time.h>
 #include <fstream>
@@ -48,6 +47,8 @@

 #define GC_INCLUDE_NEW

+#include <pthread.h>
+
 #include <gc/gc.h>
 #include <gc/gc_cpp.h>
 #include <gc/gc_allocator.h>

Fix for Windows, and FreeBSD is back! :)

Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

I think this is good

  • Many prior release, we disabled some i686 VM tests. I think it's fine to do that to start. The fact that there is a potential upstream solution or this is icing on the cake!

  • The GC patch does stop us from using old versions, but that's also fine, because getting rid of our Nix-specific patch is so good. If someone wants to restore the old version support, we can always do it with CPP. But let's not do that if no one asks.

@roberth roberth marked this pull request as ready for review June 5, 2024 21:56
@Ericson2314 Ericson2314 merged commit 1a32490 into NixOS:master Jun 5, 2024
9 checks passed
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-06-03-nix-team-meeting-minutes-149/46582/1

roberth added a commit to hercules-ci/nix that referenced this pull request Jun 10, 2024
> Support client-defined stack pointer adjustment before thread stack push

-- https://github.com/ivmai/bdwgc/releases/tag/v8.2.4

This fixes an inaccuracy in cc6f315,
in the update to Nixpkgs 24.05 NixOS#10835

After this fixup, the build log won't ask for an upgrade, and we'll be
able to collect when a coroutine exists, e.g. during filterSource.
@edolstra
Copy link
Member

@Ericson2314 @jdek

It looks like this broke the riscv64 and FreeBSD builds: https://hydra.nixos.org/eval/1806835#tabs-still-fail

The riscv64 build is a dependency of the installerScript job and therefore a release blocker (see #10806), so we should either fix it or drop it from the installer script.

@jdek
Copy link
Contributor

jdek commented Jun 10, 2024

@edolstra only the multi-core builds seem to fail for me. --cores 1 it builds successfully.

@Ericson2314
Copy link
Member

@edolstra the FreeBSD build is newly re-introduced since that platform is unbroken in 24.05. I'll fix it, but I wouldn't call it a regression per se :)

jfroche added a commit to jfroche/nix that referenced this pull request Jun 13, 2024
NixOS 24.05 is now used on the main branch as NixOS#10835 has been merged.

This commit backport the `boehm-gc` fix
(NixOS@b311f51) to the 2.18.2 tag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c api Nix as a C library with a stable interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants