From 24057dcb6a5d33806de66de1e42137eca398350e Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Thu, 6 Jun 2024 02:08:20 -0700 Subject: [PATCH 1/3] Remove rl-next-dev We realized that there's really no good place to put these dev facing bulletins, and the user-facing release notes aren't really the worst place to put them, I guess, and we do kind of hope that it converts users to devs. Change-Id: Id9387b2964fe291cb5a3f74ad6344157f19b540c --- .../{rl-next-dev => rl-next}/build-timing-analysis.md | 9 ++++++++- flake.nix | 2 -- maintainers/build-release-notes.py | 2 +- misc/pre-commit.nix | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) rename doc/manual/{rl-next-dev => rl-next}/build-timing-analysis.md (59%) diff --git a/doc/manual/rl-next-dev/build-timing-analysis.md b/doc/manual/rl-next/build-timing-analysis.md similarity index 59% rename from doc/manual/rl-next-dev/build-timing-analysis.md rename to doc/manual/rl-next/build-timing-analysis.md index e59f3ca02..1bf803dab 100644 --- a/doc/manual/rl-next-dev/build-timing-analysis.md +++ b/doc/manual/rl-next/build-timing-analysis.md @@ -1,11 +1,13 @@ --- synopsis: Clang build timing analysis cls: 587 +category: Development --- We now have Clang build profiling available, which generates Chrome tracing files for each compilation unit. To enable it, run `meson configure -build -Dprofile-build=enabled` then rerun the compilation. +build -Dprofile-build=enabled` in a Clang stdenv (`nix develop +.#native-clangStdenvPackages`) then rerun the compilation. If you want to make the build go faster, do a clang build with meson, then run `maintainers/buildtime_report.sh build`, then contemplate how to improve the @@ -13,3 +15,8 @@ build time. You can also look at individual object files' traces in . + +See [the wiki page][improving-build-times-wiki] for more details on how to do +this. + +[improving-build-times-wiki]: https://wiki.lix.systems/link/8#bkmrk-page-title diff --git a/flake.nix b/flake.nix index 66b836f03..d0b674464 100644 --- a/flake.nix +++ b/flake.nix @@ -227,7 +227,6 @@ in { user = rl-next-check "rl-next" ./doc/manual/rl-next; - dev = rl-next-check "rl-next-dev" ./doc/manual/rl-next-dev; } ); @@ -309,7 +308,6 @@ perlBindings = self.hydraJobs.perlBindings.${system}; nixpkgsLibTests = self.hydraJobs.tests.nixpkgsLibTests.${system}; rl-next = self.hydraJobs.rl-next.${system}.user; - rl-next-dev = self.hydraJobs.rl-next.${system}.dev; # Will be empty attr set on i686-linux, and filtered out by forAvailableSystems. pre-commit = self.hydraJobs.pre-commit.${system}; } diff --git a/maintainers/build-release-notes.py b/maintainers/build-release-notes.py index 45d5d6ff9..c8905cde0 100644 --- a/maintainers/build-release-notes.py +++ b/maintainers/build-release-notes.py @@ -1,6 +1,5 @@ from collections import defaultdict import frontmatter -import sys import pathlib import textwrap from typing import Any, Tuple @@ -27,6 +26,7 @@ CATEGORIES = [ 'Improvements', 'Fixes', 'Packaging', + 'Development', 'Miscellany', ] diff --git a/misc/pre-commit.nix b/misc/pre-commit.nix index 4f54141b3..292940e83 100644 --- a/misc/pre-commit.nix +++ b/misc/pre-commit.nix @@ -63,7 +63,7 @@ pre-commit-run { files = ''^doc/manual/(change-authors\.yml|rl-next(-dev)?)''; pass_filenames = false; entry = '' - ${lib.getExe pkgs.build-release-notes} --change-authors doc/manual/change-authors.yml doc/manual/rl-next doc/manual/rl-next-dev + ${lib.getExe pkgs.build-release-notes} --change-authors doc/manual/change-authors.yml doc/manual/rl-next ''; }; change-authors-sorted = { From 9c77c62e731e3fb9b1a87414c5b2d7a52932a507 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Thu, 6 Jun 2024 11:35:03 -0700 Subject: [PATCH 2/3] Move version to a JSON file so we can have release names Change-Id: I5ff3396a302565ee5ee6c2db97e048e403779076 --- .version | 1 - docker.nix | 2 +- flake.nix | 8 +++----- meson.build | 2 +- nix-support/binary-tarball.nix | 5 ++--- package.nix | 5 +++-- perl/default.nix | 2 +- perl/meson.build | 2 +- version.json | 4 ++++ 9 files changed, 16 insertions(+), 15 deletions(-) delete mode 100644 .version create mode 100644 version.json diff --git a/.version b/.version deleted file mode 100644 index 4004af690..000000000 --- a/.version +++ /dev/null @@ -1 +0,0 @@ -2.90.0 diff --git a/docker.nix b/docker.nix index 2d57cd548..cec3a2950 100644 --- a/docker.nix +++ b/docker.nix @@ -1,7 +1,7 @@ { pkgs ? import { }, lib ? pkgs.lib, - name ? "nix", + name ? "lix", tag ? "latest", bundleNixpkgs ? true, channelName ? "nixpkgs", diff --git a/flake.nix b/flake.nix index d0b674464..fd8b7995e 100644 --- a/flake.nix +++ b/flake.nix @@ -59,7 +59,6 @@ # Set to true to build the release notes for the next release. buildUnreleasedNotes = true; - version = lib.fileContents ./.version + versionSuffix; versionSuffix = if officialRelease then "" @@ -149,8 +148,7 @@ } ); - binaryTarball = - nix: pkgs: pkgs.callPackage ./nix-support/binary-tarball.nix { inherit nix version; }; + binaryTarball = nix: pkgs: pkgs.callPackage ./nix-support/binary-tarball.nix { inherit nix; }; overlayFor = getStdenv: final: prev: @@ -330,10 +328,10 @@ pkgs = nixpkgsFor.${system}.native; image = import ./docker.nix { inherit pkgs; - tag = version; + tag = pkgs.nix.version; }; in - pkgs.runCommand "docker-image-tarball-${version}" + pkgs.runCommand "docker-image-tarball-${pkgs.nix.version}" { meta.description = "Docker image with Lix for ${system}"; } '' mkdir -p $out/nix-support diff --git a/meson.build b/meson.build index b98b1fb15..51c7bda59 100644 --- a/meson.build +++ b/meson.build @@ -39,7 +39,7 @@ # in the build directory. project('lix', 'cpp', - version : run_command('bash', '-c', 'echo -n $(cat ./.version)$VERSION_SUFFIX', check : true).stdout().strip(), + version : run_command('bash', '-c', 'echo -n $(jq -r .version < ./version.json)$VERSION_SUFFIX', check : true).stdout().strip(), default_options : [ 'cpp_std=c++2a', # TODO(Qyriad): increase the warning level diff --git a/nix-support/binary-tarball.nix b/nix-support/binary-tarball.nix index 8d25227c3..7b9bf5c2b 100644 --- a/nix-support/binary-tarball.nix +++ b/nix-support/binary-tarball.nix @@ -3,7 +3,6 @@ cacert, nix, system, - version, }: let installerClosureInfo = buildPackages.closureInfo { @@ -15,10 +14,10 @@ let meta.description = "Distribution-independent Lix bootstrap binaries for ${system}"; in -buildPackages.runCommand "lix-binary-tarball-${version}" { inherit meta; } '' +buildPackages.runCommand "lix-binary-tarball-${nix.version}" { inherit meta; } '' cp ${installerClosureInfo}/registration $TMPDIR/reginfo - dir=lix-${version}-${system} + dir=lix-${nix.version}-${system} fn=$out/$dir.tar.xz mkdir -p $out/nix-support echo "file binary-dist $fn" >> $out/nix-support/hydra-build-products diff --git a/package.nix b/package.nix index a39ff4b2e..005bdc6b1 100644 --- a/package.nix +++ b/package.nix @@ -88,7 +88,8 @@ let inherit (lib) fileset; inherit (stdenv) hostPlatform buildPlatform; - version = lib.fileContents ./.version + versionSuffix; + versionJson = builtins.fromJSON (builtins.readFile ./version.json); + version = versionJson.version + versionSuffix; aws-sdk-cpp-nix = aws-sdk-cpp.override { apis = [ @@ -138,7 +139,7 @@ let # that would interfere with repo semantics. baseFiles = fileset.fileFilter (f: f.name != ".gitignore") ./.; - configureFiles = fileset.unions [ ./.version ]; + configureFiles = fileset.unions [ ./version.json ]; topLevelBuildFiles = fileset.unions ([ ./meson.build diff --git a/perl/default.nix b/perl/default.nix index 7ce418402..ed2584c7f 100644 --- a/perl/default.nix +++ b/perl/default.nix @@ -23,7 +23,7 @@ perl.pkgs.toPerlModule ( src = fileset.toSource { root = ../.; fileset = fileset.unions ([ - ../.version + ../version.json ./lib ./meson.build ]); diff --git a/perl/meson.build b/perl/meson.build index 4b179da8f..b542f3e8a 100644 --- a/perl/meson.build +++ b/perl/meson.build @@ -1,5 +1,5 @@ project('lix-perl', 'cpp', - version : run_command('bash', '-c', 'echo -n $(cat ../.version)$VERSION_SUFFIX', check : true).stdout().strip(), + version : run_command('bash', '-c', 'echo -n $(jq -r .version < ../version.json)$VERSION_SUFFIX', check : true).stdout().strip(), default_options : [ 'cpp_std=c++2a', # TODO(Qyriad): increase the warning level diff --git a/version.json b/version.json new file mode 100644 index 000000000..877e7a20b --- /dev/null +++ b/version.json @@ -0,0 +1,4 @@ +{ + "version": "2.90.0", + "release_name": "Vanilla Ice Cream" +} From 611b1de441a54d3ed7781ca0a26b51b6cb9c45cc Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Thu, 6 Jun 2024 02:07:57 -0700 Subject: [PATCH 3/3] Add meson release note Change-Id: I4d2d08dc77a3ab4dce9fbb129c1487aa8c9f1722 --- doc/manual/rl-next/meson.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/manual/rl-next/meson.md diff --git a/doc/manual/rl-next/meson.md b/doc/manual/rl-next/meson.md new file mode 100644 index 000000000..f836d192f --- /dev/null +++ b/doc/manual/rl-next/meson.md @@ -0,0 +1,15 @@ +--- +synopsis: Lix is built with meson +# and many more +cls: [580, 627, 628, 707, 711, 712, 719] +credits: [Qyriad, horrors, jade, 9999years, winter] +category: Packaging +--- + +Lix is built exclusively with the meson build system thanks to a huge team-wide +effort, and the legacy `make`/`autoconf` based build system has been removed +altogether. This improves maintainability of Lix, enables things like saving +20% of compile times with precompiled headers, and generally makes the build +less able to produce obscure incremental compilation bugs. + +Non-Nix-based downstream packaging needs rewriting accordingly.