I don't really know what the check is for, and I've seen
no interest in looking into this for a week.
Let's unblock the ~10k jobs waiting on this failure.
Nit: I would've liked to format this piece of code
to better read for humans, but nixfmt won't let me :-(
I was also careful to avoid rebuilds on *-linux.
The --with-setjmp-type=setjmp configure flag was added in 2014 to work
around a hang during "generating encdb.h" on macOS 10.10 (Yosemite).
This flag forces Ruby to use setjmp/longjmp instead of the default
_setjmp/_longjmp, which causes a 5.5x slowdown in proc and block calls
on modern macOS due to unnecessary signal mask save/restore operations.
macOS 10.10 Yosemite reached end of life in 2017 and is far below the
minimum macOS version supported by nixpkgs (currently 10.14 I think?).
The underlying issue was specific to that OS version and does not affect
any supported macOS release.
I am however not 100% sure which release this incompatibility _stopped_
with. It certainly works on Tahoe.
- Renamed ruby_3_5 to ruby_4_0 following the upstream renaming from 3.5 to 4.0
- Updated to version 4.0.0-preview3
- Added backwards compatibility aliases for ruby_3_5 and rubyPackages_3_5
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
- 0b559eab04/yjit/yjit.mk (L22-L27)
Only `$RUSTC`, which desugars to `rustc` by default, is used for yjit.
Note that the plumbing for cargo does exist, but is used for development
purposes only.
Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
(cherry picked from commit 90e5b96d7fc14cd8b4e290769f4d188e75329a32)
Otherwise it will produce `yjit.a` with the default target for the
`rustc` compiler, which in turn turns out to be the build platform?
It could be configured using the `RUST` environment variable, and
since it's used without quoting it would expand the arguments added
to it.
Using `RUST = "rust --target ..."` I think would be undesirable for
cross-compiling (and native), since it will save those arguments in
`lib/ruby/*/*/rbconfig.rb`. Though that might be fine too. I guess.
Note that 3.2 breaks differently. I haven't investigated it, since it's
not the default anymore, and will eventually be dropped.
Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
(cherry picked from commit 75d6216956bfb72a2a1082da7237f74dddf8e123)
Ruby 3.5.0-preview1 is also affected, but it’s several months old
and the patches do not apply cleanly to it. Hopefully that won’t
be a big deal, since the fixes will be picked up on the next update.
Closes: #449970