diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7976f1f64..5849d21e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,8 @@ name: CI # breakage shows first; # - a pull request from a release/* branch (the "Release X.Y.Z" PR), a run by hand # (workflow_dispatch, `tfms` input, both by default) and the gate in release.yml -# (workflow_call on a v* tag): net10.0 as well, the LTS the downloads are built on. +# (workflow_call on a v* tag, with tfms: both): net10.0 as well. The downloads are built +# on both: net10.0, the LTS, is the main one, and net11.0 archives ship beside it. on: push: branches: [master, modernize, 'ci/**'] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f8ba0d00a..f52d90926 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,11 @@ name: Release -# Binary builds: a self-contained IronRuby for each platform, made by -# Util/package-release.sh, and for Windows also an installer made from that archive by -# Util/installer/build-installer.sh. Pushing a tag v* publishes them as a GitHub release (a -# pre-release while the version has a suffix such as -preview1), with +# Binary builds: a self-contained IronRuby for each platform and each target framework, +# made by Util/package-release.sh, and for Windows also an installer made from the net10.0 +# archive by Util/installer/build-installer.sh. net10.0 (LTS) is the main download and keeps +# the plain names (ironruby--.*, and the -setup.exe); net11.0 archives sit +# beside them as ironruby--net11-.*. Pushing a tag v* publishes them all as a +# GitHub release (a pre-release while the version has a suffix such as -preview1), with # Docs/releases/.md as the notes when there is one; running the workflow by hand, or # a pull request that changes the packaging, only keeps them as workflow artifacts. # Each published file gets a signed build provenance attestation (actions/attest) in the @@ -49,18 +51,18 @@ env: jobs: # The pull requests and pushes of ci.yml test net11.0 only; the downloads are built on - # net10.0, so a v* tag runs ci.yml's whole net10.0 test set first, and the release job - # below publishes nothing unless it passed. (The Release PR, from a release/* branch, - # has run it on both frameworks already.) + # net10.0 and net11.0, so a v* tag runs ci.yml's whole test set on both first, and the + # release job below publishes nothing unless it passed. (The Release PR, from a release/* + # branch, has run it on both frameworks already.) tests: - name: net10.0 tests + name: tests if: github.event_name == 'push' && github.ref_type == 'tag' uses: ./.github/workflows/ci.yml with: - tfms: net10.0 + tfms: both package: - name: ${{ matrix.rid }} + name: ${{ matrix.rid }} ${{ matrix.tfm }} if: github.event_name != 'workflow_dispatch' || inputs.video_for == '' runs-on: ${{ matrix.os }} # macOS is untested (README, Platforms): a failure there does not hold the release back. @@ -75,9 +77,12 @@ jobs: fail-fast: false matrix: include: - - { os: ubuntu-latest, rid: linux-x64, experimental: false } - - { os: windows-latest, rid: win-x64, experimental: false } - - { os: macos-latest, rid: osx-arm64, experimental: true } + - { os: ubuntu-latest, rid: linux-x64, tfm: net10.0, sdk: 10.0.x, experimental: false } + - { os: windows-latest, rid: win-x64, tfm: net10.0, sdk: 10.0.x, experimental: false } + - { os: macos-latest, rid: osx-arm64, tfm: net10.0, sdk: 10.0.x, experimental: true } + - { os: ubuntu-latest, rid: linux-x64, tfm: net11.0, sdk: 11.0.x, experimental: false } + - { os: windows-latest, rid: win-x64, tfm: net11.0, sdk: 11.0.x, experimental: false } + - { os: macos-latest, rid: osx-arm64, tfm: net11.0, sdk: 11.0.x, experimental: true } defaults: run: shell: bash @@ -110,12 +115,13 @@ jobs: git -C dlr apply "../$patch" done - # The DLR multi-targets up to net10.0, so the build needs the .NET 10 SDK; the - # release itself targets net10.0 (Util/package-release.sh's IR_TFM). + # The DLR multi-targets up to net10.0, so the build needs at least the .NET 10 SDK. + # Each job installs its own framework's SDK: the .NET 10 one for net10.0, as for every + # release before, and the .NET 11 one for net11.0, which a net11.0 build needs (and + # whose runtime the startup library's compiler, Util/aot, runs on). - uses: actions/setup-dotnet@v6 with: - dotnet-version: | - 10.0.x + dotnet-version: ${{ matrix.sdk }} - uses: ruby/setup-ruby@v1 with: @@ -175,6 +181,8 @@ jobs: - name: Package working-directory: ironruby + env: + IR_TFM: ${{ matrix.tfm }} run: | if [ "$GITHUB_REF_TYPE" = tag ]; then export IR_VERSION="${GITHUB_REF_NAME#v}" @@ -193,9 +201,11 @@ jobs: run: cd ironruby-*-win-x64 && cmd //c ir.cmd Samples/Notepad/test_notepad.rb # Inno Setup, for the installer: its release from GitHub, pinned by version and by the - # SHA-256 GitHub lists for that asset, installed for this job only. + # SHA-256 GitHub lists for that asset, installed for this job only. Only the net10.0 + # archive becomes an installer: there is one, and it installs into C:\IronRuby40-x64 + # whichever framework it carries. - name: Inno Setup - if: runner.os == 'Windows' + if: runner.os == 'Windows' && matrix.tfm == 'net10.0' env: INNO_VERSION: 6.7.3 INNO_SHA256: 9c73c3bae7ed48d44112a0f48e66742c00090bdb5bef71d9d3c056c66e97b732 @@ -212,7 +222,7 @@ jobs: # The installer carries the archive just made, unchanged. - name: Installer, from the archive - if: runner.os == 'Windows' + if: runner.os == 'Windows' && matrix.tfm == 'net10.0' working-directory: ironruby run: Util/installer/build-installer.sh "$GITHUB_WORKSPACE"/dist/ironruby-*-win-x64.zip @@ -220,7 +230,7 @@ jobs: # `igem install rack` from the PATH a new terminal gets, then the uninstaller, which # must leave no file and the PATH as it was. - name: Install, run and uninstall - if: runner.os == 'Windows' + if: runner.os == 'Windows' && matrix.tfm == 'net10.0' timeout-minutes: 15 shell: pwsh working-directory: dist @@ -234,8 +244,9 @@ jobs: # Signed SLSA build provenance for the archive a tag publishes, with GitHub's own # actions/attest, pinned to the commit of its v4.2.2 tag: `gh attestation verify # --repo Largo/ironruby` shows that this workflow built it, from which - # commit and in which run. dist/ironruby--*.* is the archive, and on - # Windows the installer, -setup.exe; not the directory the archive was packed from. + # commit and in which run. dist/ironruby--[net11-]*.* is the archive, and + # on Windows net10.0 the installer, -setup.exe; not the directory the archive was + # packed from. - name: Attest build provenance if: github.event_name == 'push' && github.ref_type == 'tag' uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2 @@ -244,7 +255,7 @@ jobs: - uses: actions/upload-artifact@v7 with: - name: ironruby-${{ matrix.rid }} + name: ironruby-${{ matrix.rid }}-${{ matrix.tfm }} path: | dist/*.tar.gz dist/*.zip @@ -333,7 +344,8 @@ jobs: with: sparse-checkout: Docs/releases - # ironruby-* only: the archives, not the review stills (the video is not rendered here). + # ironruby-* only: the archives of every RID and framework and the installer, not the + # review stills (the video is not rendered here). SHA256SUMS lists all of them. - uses: actions/download-artifact@v8 with: path: dist diff --git a/CLAUDE.md b/CLAUDE.md index 27ac5772e..cfd9cb83f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -182,14 +182,19 @@ diff touches only what you changed. - CI (`.github/workflows/ci.yml`) builds and tests Ubuntu and Windows, plus ruby/spec's language suite. The Windows jobs run the full IronRuby.Tests suite too. A PR or push tests **net11.0 - only**; net10.0 (what the downloads are built on) runs on a PR from a `release/*` branch, on a + only**; net10.0 (the default download is built on it) runs on a PR from a `release/*` branch, on a run by hand (`gh workflow run ci.yml --ref -f tfms=net10.0`, or `both`), and as the gate a `v*` tag's release.yml must pass before it publishes. A net10.0-only regression can therefore sit on master until the next release PR; run the workflow by hand when in doubt. -- Cutting a release: a "Release X.Y.Z" PR from `release/vX.Y.Z` (version files, README, and - `Docs/releases/vX.Y.Z.md`), whose CI runs net10.0 and net11.0; merge it, then push an annotated - tag `vX.Y.Z` on the merge commit. release.yml runs ci.yml's net10.0 test set and packages the - net10.0 downloads, and publishes only if both succeed. +- Cutting a release: a "Release X.Y.Z" PR from `release/vX.Y.Z` (version files, README, the + installer scripts' examples, and `Docs/releases/vX.Y.Z.md`), whose CI runs net10.0 and net11.0; + merge it, then push an annotated tag `vX.Y.Z` on the merge commit. release.yml runs ci.yml's + test set on both frameworks (`tfms: both`) and packages every RID on both: the net10.0 + archives keep the plain names (`ironruby-X.Y.Z-.*`) and the Windows installer is made + from that zip; the net11.0 ones are `ironruby-X.Y.Z-net11-.*` + (`IR_TFM=net11.0 Util/package-release.sh `). It publishes only if the tests and the + Linux and Windows packages succeed (macOS is experimental), with every file in SHA256SUMS + and attested. - A PR whose branch conflicts with master gets **no** `pull_request` CI run at all, silently. Merge master into the branch, or dispatch the workflow on the branch (`workflow_dispatch`). - CodeRabbit reviews every PR. Read the review **bodies** too: findings on lines outside the diff --git a/Docs/releases/v4.0.5.md b/Docs/releases/v4.0.5.md new file mode 100644 index 000000000..0fd461119 --- /dev/null +++ b/Docs/releases/v4.0.5.md @@ -0,0 +1,94 @@ +**IronRuby 4.0.5** is the first release built for .NET 10 and .NET 11, and the first without .NET 8. .NET 8 reached the end of Microsoft support on 10 November 2026, and 4.0.4 was the last release for it. Each download now comes in two builds: one on .NET 10, an LTS release and the default download, which keeps the names earlier releases used, and one on .NET 11, named `-net11-`. Both carry their runtime, so neither needs .NET installed. On .NET 11.0.0, multiplying and dividing big Integers is several times slower than on .NET 10; most other code runs a few percent faster there. Apart from the move to the new runtimes, it has one fix, which .NET 11 made necessary: an Integer too large for .NET's BigInteger raises `NoMemoryError` on every runtime. + +### .NET 10 and .NET 11 + +- **.NET 8 is gone.** The source builds for `net10.0` and `net11.0` + (`IronRubyTargetFrameworks` in `Directory.Build.props`), and the code that only .NET 8 + needed is removed (#198). A program that hosts IronRuby, or loads its assemblies, needs + .NET 10 or later. Scripts run with the self-contained downloads are not affected: the + downloads bring their own runtime. +- **Two downloads for each platform.** The archives named as before, + `ironruby-4.0.5-`, and the Windows installer are built on .NET 10 and carry the + .NET 10 runtime. .NET 10 is supported until 14 November 2028 + ([.NET support policy](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core)). + The `ironruby-4.0.5-net11-` archives are the same IronRuby built on .NET 11 + and carry its runtime. Their launchers run the .NET 11 build. There is no .NET 11 + installer. +- **Why .NET 10 is the default.** On .NET 11.0.0, `BigInteger` multiplication and division + are 3 to 6 times slower than on .NET 10, in plain C# too: a 3,000-digit `a * b` takes + 176 µs instead of 37 µs. Code that works on big Integers runs slower on the .NET 11 + download; TruffleRuby's `pidigits` benchmark takes 3.3 times as long (#198). +- **Elsewhere, .NET 11 is a little faster** (#198, Release builds measured side by side on + Linux x64). Startup is about 5% shorter: `ir -e 1` takes 430 ms instead of 456 ms, and + `require "json"` 502 ms instead of 530 ms. TruffleRuby's `bench/` (136 benchmarks) runs + 3.5% faster by geometric mean, and a 10-benchmark subset of ruby-bench 3.9% faster. + AWFY is unchanged (+0.2%). Among the issue #89 micro-benchmarks, a raise rescued in + place is 15% faster and `Thread.new { }.join` 17% faster, while `is_a?` is 25% slower. + +### Changed + +- **No Integer can be wider than about 2\*\*31 bits** (#198). .NET's `BigInteger` holds at + most 2\*\*31 - 64 bits on .NET 9 and later. The 4.0.4 downloads ran on .NET 8, where + `1 << 2**31` built the Integer; on the 4.0.5 downloads it raises `NoMemoryError`, as + CRuby does when an allocation fails. +- **On Windows, `zlib` runs on .NET 10's or .NET 11's zlib-ng** (#198), the zlib inside + .NET, where 4.0.4 ran on .NET 8's fork of zlib 1.2. `Zlib::ZLIB_VERSION` is + `"1.3.1.zlib-ng"` instead of `"1.2.13"`, and compressed bytes may differ from 4.0.4's. + They inflate the same. + +### Fixed + +- **Too-large Integers on .NET 11 raise `NoMemoryError`** (#198). .NET 11's `BigInteger` + shifts no longer check its maximum length, while its other operations still do + ([dotnet/runtime#137327](https://github.com/dotnet/runtime/issues/137327)). So on .NET 11 + `1 << 2**31` succeeded, and the next operation on the result, such as `x | 1`, raised a + raw `System::OverflowException`. IronRuby now checks the limit itself, in left shifts, + `Integer#**`, right shifts by a negative count and on negative Integers, and raises + `NoMemoryError` as it does on .NET 10. + +### For contributors + +- **CI tests .NET 11 on every pull request and push, and .NET 10 before a release** (#198). + `ci.yml` runs `net11.0` only on pull requests and pushes. `net10.0` runs as well on a pull + request from a `release/*` branch, on a run by hand (`workflow_dispatch`, `tfms` input: + `both`, `net10.0` or `net11.0`) and in `release.yml` when a `v*` tag is pushed. There, + ci.yml's whole test set runs on both frameworks, and nothing is published unless it + passes. +- **`Util/package-release.sh` takes the framework from `IR_TFM`** (`net10.0` by default). A + `net11.0` archive is named `ironruby--net11-`, and its launchers default to + that build. `release.yml` packages every platform on both frameworks. +- **The startup library (`Util/aot`) is built for both frameworks** (#198). A Linux Release + build now installs `IronRuby.Startup.dll` in the `net10.0` and the `net11.0` ReadyToRun + host. Before, it built for neither. +- `ir.sh`, `ironruby(.cmd)`, the `Makefile`, `default.mspec` and the `Util` scripts default to + `net10.0`; `IR_TFM=net11.0` picks the .NET 11 build. + +### Download + +Self-contained: unpack one and run `./ironruby`, `./iirb.sh` and `./igem.sh` - on Windows +`ironruby.cmd`, `iirb.cmd` and `igem.cmd`. No .NET to install. Or, on Windows, run the +installer. + +On .NET 10 (LTS, the default): + +- **Windows x64 installer**: `ironruby-4.0.5-win-x64-setup.exe`, the zip below, installed + into `C:\IronRuby40-x64` and put on the PATH +- **Windows x64**: `ironruby-4.0.5-win-x64.zip`, with Windows Forms, WPF, `ironrubyw.exe` + and `Samples\Notepad\notepad.cmd` +- **Linux x64**: `ironruby-4.0.5-linux-x64.tar.gz` +- **macOS arm64**: `ironruby-4.0.5-osx-arm64.tar.gz`, built in CI, not tested there + +On .NET 11: + +- **Windows x64**: `ironruby-4.0.5-net11-win-x64.zip`, with the same contents as the + .NET 10 zip +- **Linux x64**: `ironruby-4.0.5-net11-linux-x64.tar.gz` +- **macOS arm64**: `ironruby-4.0.5-net11-osx-arm64.tar.gz`, built in CI, not tested there + +`SHA256SUMS` lists the checksums of all of them. Each file and `SHA256SUMS` has a signed +build provenance attestation, which says which workflow built it, from which commit, in +which run: + +``` +gh attestation verify ironruby-4.0.5-net11-linux-x64.tar.gz --repo Largo/ironruby +``` diff --git a/README.md b/README.md index b4d730ed8..fcee0b7fe 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ brought back to life: it **builds and runs on .NET 10 and 11**, and it parses Ru **[prism](https://github.com/ruby/prism), CRuby's own parser**, instead of the hand-ported Ruby 1.9 grammar it shipped with in 2011. -**IronRuby 4.0 is the first stable release since 1.1.3 in 2011**, and 4.0.4 is its latest. +**IronRuby 4.0 is the first stable release since 1.1.3 in 2011**, and 4.0.5 is its latest. The downloads are self-contained: unpack one and run it, there is no .NET to install. **The compatibility target is Ruby 4.0.** IronRuby aims to run what CRuby 4.0 runs, with @@ -20,23 +20,30 @@ differs from CRuby 4.0's, that is a bug in IronRuby. Ruby 3.x behaviour that 4.0 (`Set` as a core class, `Hash#inspect`, frozen string literals, the error messages) is not kept. -| | Download | | +| | Download (.NET 10) | | |---|---|---| -| **Windows** x64 | [ironruby-4.0.4-win-x64-setup.exe](https://github.com/Largo/ironruby/releases/download/v4.0.4/ironruby-4.0.4-win-x64-setup.exe) | the installer: the zip below, installed and put on the PATH | -| **Windows** x64 | [ironruby-4.0.4-win-x64.zip](https://github.com/Largo/ironruby/releases/download/v4.0.4/ironruby-4.0.4-win-x64.zip) | with Windows Forms, WPF and the Notepad sample | -| **Linux** x64 | [ironruby-4.0.4-linux-x64.tar.gz](https://github.com/Largo/ironruby/releases/download/v4.0.4/ironruby-4.0.4-linux-x64.tar.gz) | | -| **macOS** arm64 | [ironruby-4.0.4-osx-arm64.tar.gz](https://github.com/Largo/ironruby/releases/download/v4.0.4/ironruby-4.0.4-osx-arm64.tar.gz) | built in CI, not tested there | - -[SHA256SUMS](https://github.com/Largo/ironruby/releases/download/v4.0.4/SHA256SUMS) · -[release notes](https://github.com/Largo/ironruby/releases/tag/v4.0.4) · +| **Windows** x64 | [ironruby-4.0.5-win-x64-setup.exe](https://github.com/Largo/ironruby/releases/download/v4.0.5/ironruby-4.0.5-win-x64-setup.exe) | the installer: the zip below, installed and put on the PATH | +| **Windows** x64 | [ironruby-4.0.5-win-x64.zip](https://github.com/Largo/ironruby/releases/download/v4.0.5/ironruby-4.0.5-win-x64.zip) | with Windows Forms, WPF and the Notepad sample | +| **Linux** x64 | [ironruby-4.0.5-linux-x64.tar.gz](https://github.com/Largo/ironruby/releases/download/v4.0.5/ironruby-4.0.5-linux-x64.tar.gz) | | +| **macOS** arm64 | [ironruby-4.0.5-osx-arm64.tar.gz](https://github.com/Largo/ironruby/releases/download/v4.0.5/ironruby-4.0.5-osx-arm64.tar.gz) | built in CI, not tested there | + +The same on .NET 11: +[ironruby-4.0.5-net11-win-x64.zip](https://github.com/Largo/ironruby/releases/download/v4.0.5/ironruby-4.0.5-net11-win-x64.zip) · +[ironruby-4.0.5-net11-linux-x64.tar.gz](https://github.com/Largo/ironruby/releases/download/v4.0.5/ironruby-4.0.5-net11-linux-x64.tar.gz) · +[ironruby-4.0.5-net11-osx-arm64.tar.gz](https://github.com/Largo/ironruby/releases/download/v4.0.5/ironruby-4.0.5-net11-osx-arm64.tar.gz) +(no installer). + +[SHA256SUMS](https://github.com/Largo/ironruby/releases/download/v4.0.5/SHA256SUMS) · +[release notes](https://github.com/Largo/ironruby/releases/tag/v4.0.5) · [all releases](https://github.com/Largo/ironruby/releases) · [getting started](#binary-releases) -> **4.0.4 is the last release that supports .NET 8.** Its downloads are built for `net8.0` -> and carry the .NET 8 runtime. .NET 8 reached the end of Microsoft support on 10 November -> 2026, and the source no longer builds for it: it builds for `net10.0` (LTS) and `net11.0`, -> and from the next release the self-contained downloads are built on .NET 10, so a program -> that hosts IronRuby needs .NET 10 or later. -> [More in the 4.0.4 release notes](https://github.com/Largo/ironruby/releases/tag/v4.0.4). +> **Each release is built for .NET 10 and for .NET 11.** The downloads in the table carry +> the .NET 10 runtime, an LTS release supported until November 2028, and stay the default; +> the `-net11-` archives carry .NET 11's. On .NET 11.0.0, multiplying and dividing big +> Integers is several times slower than on .NET 10, so a program that does a lot of that +> (pidigits, say) runs slower on the .NET 11 download; most other code runs a few percent +> faster there. 4.0.4 was the last release for .NET 8. +> [More in the 4.0.5 release notes](https://github.com/Largo/ironruby/releases/tag/v4.0.5). [![IronRuby 4.0 launch video: the title, an irb session, Windows Forms and the Notepad sample](media/launch/teaser.webp)](https://github.com/Largo/ironruby/releases/download/v4.0.0/ironruby-4-launch.mp4) @@ -73,7 +80,7 @@ drives it in CI with nobody at the keyboard.* ```console $ ./iirb.sh irb(main):001> RUBY_DESCRIPTION -=> "IronRuby 4.0.4 (4.0.0) on .NET 10.0.12 [x86_64-linux]" +=> "IronRuby 4.0.5 (4.0.0) on .NET 10.0.12 [x86_64-linux]" irb(main):002> def fib(n) = n < 2 ? n : fib(n - 1) + fib(n - 2) => :fib irb(main):003> (1..10).map { fib(_1) } @@ -207,7 +214,7 @@ releases for that Ruby version (4.0.0, 4.0.1, ...) and is not CRuby's patch leve release notes say which CRuby release the specs were checked against. The last release of the original project was 1.1.3, for Ruby 1.9.2, in 2011. -`IRONRUBY_VERSION` is the full version (`4.0.4`, or `4.0.0-preview1` for a pre-release), +`IRONRUBY_VERSION` is the full version (`4.0.5`, or `4.0.0-preview1` for a pre-release), `RUBY_ENGINE_VERSION` the same without the pre-release suffix, and `RUBY_VERSION` the Ruby version (`4.0.0`). @@ -623,12 +630,13 @@ processes, socket addresses and Puma were fixed there in 4.0.1 (#12, #13). [Releases](https://github.com/Largo/ironruby/releases) carry a ready-to-run IronRuby for Linux x64, Windows x64 and macOS arm64 (not tested in CI); the [table at the top](#ironruby-modernized) -links the ones for 4.0.4. They are self-contained, so no .NET has to be installed: the 4.0.4 -downloads carry the .NET 8 runtime, the last to do so, and from the next release on they -carry .NET 10's. Unpack one and run the launchers in it: +links the ones for 4.0.5. They are self-contained, so no .NET has to be installed: from +4.0.5 on, each is built twice, on .NET 10 (`ironruby--`, the default) and on +.NET 11 (`ironruby--net11-`), and carries that runtime; 4.0.4 and earlier +carry .NET 8's. Unpack one and run the launchers in it: ```console -$ tar xzf ironruby-4.0.4-linux-x64.tar.gz && cd ironruby-4.0.4-linux-x64 +$ tar xzf ironruby-4.0.5-linux-x64.tar.gz && cd ironruby-4.0.5-linux-x64 $ ./ironruby -e 'puts RUBY_DESCRIPTION' $ ./iirb.sh $ ./igem.sh install rack @@ -647,18 +655,20 @@ Rails templates and mspec do not handle. Nothing in that directory is named like launcher, so CRuby's `ruby`, `irb` and `gem` are not affected. `Util/installer/build-installer.sh` makes it from the zip with [Inno Setup](https://jrsoftware.org/isinfo.php), from `Util/installer/ironruby.iss`. The archive has the same layout as a checkout, with the -Release build in `Src/Console/bin/Release/net8.0` (4.0.4; `net10.0` from the next release), -so everything above applies to it unchanged. `irubyc` works too, but it still needs the .NET SDK to compile the application. +Release build in `Src/Console/bin/Release/net10.0` (`net11.0` in a `-net11-` archive, whose +launchers run that one by default; `net8.0` in 4.0.4 and earlier), so everything above +applies to it unchanged. `irubyc` works too, but it still needs the .NET SDK to compile the application. The Windows archive also carries the Windows Desktop runtime, for Windows Forms and WPF, and `Samples/`. `License/` holds IronRuby's licenses and, for each .NET framework an archive bundles, Microsoft's license and third-party notices. -`Util/package-release.sh ` builds such an archive from a checkout (on `net10.0`; `IR_TFM` -picks another), and `.github/workflows/release.yml` builds all three, and the Windows installer from the zip, +`Util/package-release.sh ` builds such an archive from a checkout (on `net10.0`; +`IR_TFM=net11.0` builds the `-net11-` one), and `.github/workflows/release.yml` builds all +three on both frameworks, and the Windows installer from the .NET 10 zip, installs and uninstalls it once for the current user and once for all users, and -publishes them when a `v*` tag is pushed - but only once CI's full .NET 10 test set has -passed for that tag. (Pull requests test .NET 11 only; the release PR, from a `release/*` -branch, tests .NET 10 as well, and so does a run of the CI workflow by hand.) The [launch video](media/launch) is rendered and +publishes them when a `v*` tag is pushed - but only once CI's full test set has passed +for that tag on both .NET 10 and .NET 11. (Pull requests test .NET 11 only; the release PR, +from a `release/*` branch, tests .NET 10 as well, and so does a run of the CI workflow by hand.) The [launch video](media/launch) is rendered and added by hand. Releases from 4.0.2 on carry a signed [build provenance attestation](https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds) @@ -674,9 +684,9 @@ $ gh attestation verify ironruby--linux-x64.tar.gz --repo Largo/ironrub What is in an archive comes from these places, none of them a binary in this repository: IronRuby, the DLR and prism (libprism too) are compiled in the job from source, at the revisions `release.yml` pins; the NuGet packages the projects name, at the versions they -pin - AngleSharp, AngleSharp.Xml, Microsoft.Data.Sqlite, System.Text.Encoding.CodePages -and SQLitePCLRaw.bundle_e_sqlite3, whose native `e_sqlite3` is SQLite as that package -builds it on Windows and macOS; on Linux, SQLite's own amalgamation source, downloaded +pin - AngleSharp, AngleSharp.Xml, Microsoft.Data.Sqlite and SQLitePCLRaw.bundle_e_sqlite3 +(4.0.4 and earlier also System.Text.Encoding.CodePages) - SQLitePCLRaw's native `e_sqlite3` +being SQLite as that package builds it on Windows and macOS; on Linux, SQLite's own amalgamation source, downloaded from sqlite.org and checked against the SHA-256 `Util/build-e_sqlite3.sh` pins, which that script compiles in the job instead (the package's library crashes beside another SQLite); and the .NET runtime. The repository itself holds no programs - no `.exe`, @@ -748,7 +758,7 @@ Windows machine, keeping the same relative layout (`ir.cmd` finds the binaries u ``` C:\ir> set IR_CONFIG=Release C:\ir> ir.cmd -e "puts RUBY_DESCRIPTION" -IronRuby 4.0.4 (4.0.0) on .NET 10.0.12 [x64-mswin64] +IronRuby 4.0.5 (4.0.0) on .NET 10.0.12 [x64-mswin64] C:\ir> iirb.cmd C:\ir> set RUBY_EXE=C:\ir\ir.cmd C:\ir> ir.cmd -Imspec/lib mspec/bin/mspec-run spec/language diff --git a/Src/Ruby/CurrentVersion.cs b/Src/Ruby/CurrentVersion.cs index 50575255f..991e5a485 100644 --- a/Src/Ruby/CurrentVersion.cs +++ b/Src/Ruby/CurrentVersion.cs @@ -10,22 +10,22 @@ namespace IronRuby { public static class CurrentVersion { public const int Major = 4; public const int Minor = 0; - public const int Micro = 4; + public const int Micro = 5; public const string ReleaseLevel = "final"; public const int ReleaseSerial = 0; public const string ShortReleaseLevel = "final"; public const string Series = "4.0"; - public const string DisplayVersion = "4.0.4"; - public const string DisplayName = "IronRuby 4.0.4"; + public const string DisplayVersion = "4.0.5"; + public const string DisplayName = "IronRuby 4.0.5"; // Stays 4.0.0.0 across 4.0.x, so that what was built against one 4.0 release binds // to the next; the file version and the display version say which release it is. public const string AssemblyVersion = "4.0.0.0"; - public const string AssemblyFileVersion = "4.0.4.0"; - public const string AssemblyInformationalVersion = "IronRuby 4.0.4"; + public const string AssemblyFileVersion = "4.0.5.0"; + public const string AssemblyInformationalVersion = "IronRuby 4.0.5"; public static readonly Version Version = new Version(Major, Minor, Micro); } diff --git a/Util/installer/build-installer.sh b/Util/installer/build-installer.sh index 4d772117f..4eb296d0c 100755 --- a/Util/installer/build-installer.sh +++ b/Util/installer/build-installer.sh @@ -2,8 +2,8 @@ # Builds IronRuby's Windows installer (ironruby.iss, Inno Setup 6) from the win-x64 # release archive that Util/package-release.sh makes: # -# Util/installer/build-installer.sh dist/ironruby-4.0.4-win-x64.zip -# -> dist/ironruby-4.0.4-win-x64-setup.exe +# Util/installer/build-installer.sh dist/ironruby-4.0.5-win-x64.zip +# -> dist/ironruby-4.0.5-win-x64-setup.exe # ISCC=/path/to/ISCC.exe Util/installer/build-installer.sh ZIP OUTDIR # # The installer carries the archive's tree as it is: the archive is unpacked into a diff --git a/Util/installer/ironruby.iss b/Util/installer/ironruby.iss index 9ebdebadd..6d4218080 100644 --- a/Util/installer/ironruby.iss +++ b/Util/installer/ironruby.iss @@ -3,8 +3,8 @@ ; Util/installer/build-installer.sh builds it from the win-x64 release archive that ; Util/package-release.sh makes, and installs the archive's tree unchanged: ; -; Util/installer/build-installer.sh dist/ironruby-4.0.4-win-x64.zip -; -> dist/ironruby-4.0.4-win-x64-setup.exe +; Util/installer/build-installer.sh dist/ironruby-4.0.5-win-x64.zip +; -> dist/ironruby-4.0.5-win-x64-setup.exe ; ; It installs into C:\IronRuby40-x64 by default, as RubyInstaller installs into ; C:\Ruby40-x64: `igem install` writes the gems into the install tree @@ -18,9 +18,9 @@ ; included), and the PATH entry. ; ; build-installer.sh passes these; to run ISCC by hand, pass them the same way: -; /DAppVersion=4.0.4 the version, as in the archive's name -; /DNumericVersion=4.0.4 its leading numbers, for the setup program's file version -; /DSourceDir=C:\...\ironruby-4.0.4-win-x64 the unpacked archive +; /DAppVersion=4.0.5 the version, as in the archive's name +; /DNumericVersion=4.0.5 its leading numbers, for the setup program's file version +; /DSourceDir=C:\...\ironruby-4.0.5-win-x64 the unpacked archive #ifndef AppVersion #error Pass /DAppVersion=, as Util/installer/build-installer.sh does diff --git a/Util/installer/test-installer.ps1 b/Util/installer/test-installer.ps1 index f27301ee3..e579db4a1 100644 --- a/Util/installer/test-installer.ps1 +++ b/Util/installer/test-installer.ps1 @@ -1,7 +1,7 @@ # Installs IronRuby with the installer build-installer.sh made, checks it from a fresh # environment, as a new terminal would see it, and uninstalls it again: # -# powershell -File Util\installer\test-installer.ps1 dist\ironruby-4.0.4-win-x64-setup.exe +# powershell -File Util\installer\test-installer.ps1 dist\ironruby-4.0.5-win-x64-setup.exe # powershell -File Util\installer\test-installer.ps1 SETUP.exe -AllUsers # as admin # # It installs silently into the default directory, C:\IronRuby40-x64, which must not diff --git a/Util/package-release.sh b/Util/package-release.sh index b0610f3bf..a85c65ff0 100755 --- a/Util/package-release.sh +++ b/Util/package-release.sh @@ -4,7 +4,11 @@ # Util/package-release.sh linux-x64 # -> dist/ironruby--linux-x64.tar.gz # Util/package-release.sh win-x64 out # -> out/ironruby--win-x64.zip # IR_VERSION=4.0.0-preview1 Util/package-release.sh osx-arm64 +# IR_TFM=net11.0 Util/package-release.sh linux-x64 # -> dist/ironruby--net11-linux-x64.tar.gz # +# IR_TFM picks the target framework, and so the .NET runtime the archive carries. The +# default, net10.0 (LTS), is the main download and keeps the plain name; any other +# framework is named in the archive's (and its directory's) name, net11.0 as -net11-. # The archive keeps the source tree's layout - the launchers at the top, the build in # Src/Console/bin/Release/, the standard library in Src/StdLib - so ir.sh/ir.cmd, # igem, iirb and irubyc work from the unpacked directory exactly as they do in a @@ -30,9 +34,17 @@ set -euo pipefail RID=${1:?usage: Util/package-release.sh RID [OUTDIR]} IR_ROOT=$(cd "$(dirname "$0")/.." && pwd) OUT=$(mkdir -p "${2:-dist}" && cd "${2:-dist}" && pwd) -: "${IR_TFM:=net10.0}" +DEFAULT_TFM=net10.0 +: "${IR_TFM:=$DEFAULT_TFM}" VERSION=${IR_VERSION:-$(sed -n 's/.*DisplayVersion = "\(.*\)";.*/\1/p' "$IR_ROOT/Src/Ruby/CurrentVersion.cs")} -NAME="ironruby-$VERSION-$RID" +# Not passed on to what this runs: the checks below must find the build the way the unpacked +# archive's own launchers do, with no IR_TFM set. +export -n IR_TFM +if [ "$IR_TFM" = "$DEFAULT_TFM" ]; then + NAME="ironruby-$VERSION-$RID" +else + NAME="ironruby-$VERSION-${IR_TFM%.0}-$RID" +fi STAGE="$OUT/$NAME" # A release is CI's build: not one from a ../dlr that has fallen behind Build/dlr-patches. @@ -92,6 +104,21 @@ case "$RID" in win-*) cp -R "$IR_ROOT/Samples" "$STAGE/" ;; esac +# The launchers run Src/Console/bin//net10.0 unless IR_TFM says otherwise. An archive +# of another framework has only that framework's build, so its launchers default to it. +if [ "$IR_TFM" != "$DEFAULT_TFM" ]; then + for f in ironruby ironruby.cmd Samples/Notepad/notepad.cmd; do + [ -f "$STAGE/$f" ] || continue + sed -i.bak -e "s/IR_TFM:-$DEFAULT_TFM}/IR_TFM:-$IR_TFM}/g" -e "s/IR_TFM:=$DEFAULT_TFM}/IR_TFM:=$IR_TFM}/" \ + -e "s/\"IR_TFM=$DEFAULT_TFM\"/\"IR_TFM=$IR_TFM\"/" "$STAGE/$f" + rm -f "$STAGE/$f.bak" + if grep -q "IR_TFM[:=-]*$DEFAULT_TFM" "$STAGE/$f" || ! grep -q "IR_TFM[:=-]*$IR_TFM" "$STAGE/$f"; then + echo "package-release.sh: could not make $IR_TFM the default framework of $f" >&2 + exit 1 + fi + done +fi + # The archive carries Microsoft's runtime - .NET, and for Windows also the Windows # Desktop runtime with Windows Forms and WPF - so it carries their license and # third-party notices too, from the runtime packs the publish took the files from.