aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-08-19libstore: move respect-timeoutiness to goal methodeldritch horrors
this is useless to do on the face of it, but it'll make it easier to convert the entire output handling to use async io and promises soon Change-Id: I2d1eb62c4bbf8f57bd558b9599c08710a389b1a8
2024-08-19Merge "doc: fix broken meson deps for various manuals outputs" into mainjade
2024-08-19Merge "build: limit clang-tidy concurrency and respect NIX_BUILD_CORES" into ↵jade
main
2024-08-18libstore: clarify that build log fd and hook log fd are differenteldritch horrors
only DerivationGoal can set the hook to anything at all. it always sets buildOutFD to something that is not related to fromHook in any way, and mixing the two would have rather dire consequences for log consistency. Change-Id: Ida86727fd1cd5e1ecd78f07f3bde330a346658a8
2024-08-18build: limit clang-tidy concurrency and respect NIX_BUILD_CORESJade Lovelace
Apparently it was impolite to lint with 128 jobs on our CI machine with 128 threads. Let's fix it. Change-Id: I9ca7306294c6773c6f233690ba49d45a1da6bf7a
2024-08-18doc: fix broken meson deps for various manuals outputsJade Lovelace
This is incredibly haunted, but it can happen that you change libutil, breaking the generation of the .json files, which then does not rebuild the files. I don't expect they are slow to build, so it does not seem so bad to just rebuild them every time instead of extracting a list of all the possible deps. We want to delete this nonsense anyway and replace it with generated code. Change-Id: Ia576d1a3bdee48fbaefbb5ac194354428d179a84
2024-08-18libstore: remove DerivationGoal::isReadDesceldritch horrors
all derivation goals need a log fd of some description. let's save this single fd in a dedicated pointer field for all subclasses so that later we have just the one spot to change if we turn this into async promises Change-Id: If223adf90909247363fb823d751cae34d25d0c0b
2024-08-18libutil: Optimize feature checkspiegames
Instead of doing a linear search on an std::set, we use a bitset enum. Change-Id: Ide537f6cffdd16d06e59aaeb2e4ac0acb6493421
2024-08-18libstore: don't ignore max-build-log-size for ssh-ngeldritch horrors
Change-Id: Ieab14662bea6e6f5533325f0e945147be998f9a2
2024-08-18libstore: add explicit in-build-slot-ness to goalseldritch horrors
we don't need to expose information about how busy a Worker is if the worker can instead tell its work items whether they are in a slot. in the future we might use this to not start items waiting for a slot if no slots are currently available, but that requires more preparation. Change-Id: Ibe01ac536da7e6d6f80520164117c43e772f9bd9
2024-08-18libstore: remove method without definitioneldritch horrors
Change-Id: I676411752a4b1777045d7211ac1176693f1a3d7d
2024-08-18libstore: remove unused includes in worker codeeldritch horrors
Change-Id: I6c7fccc4e710e23a22faae2669cb75f2f6da27b4
2024-08-18libstore: make Worker::removeGoal privateeldritch horrors
Change-Id: I8583d9ff752f702a10ec52b0330b0d4d4d2614fa
2024-08-17libexpr: Deprecate URL literalspiegames
Closes #437. Change-Id: I9f67fc965bb4a7e7fd849e5067ac1cb3bab064cd
2024-08-17libexpr: Introduce Deprecated featurespiegames
They are like experimental features, but opt-in instead of opt-out. They will allow us to gracefully remove language features. See #437 Change-Id: I9ca04cc48e6926750c4d622c2b229b25cc142c42
2024-08-17treewide: Stop using URL literalspiegames
They must die Change-Id: Ibe2b1818b21d98ec1a68836d01d5dad729b8c501
2024-08-16meson: Don't use `target_machine`Artemis Tosini
The target_machine variable is meant for the target of cross compilers. We are not a cross compiler, so instead reuse our host_machine based checks. Fixes Linux→FreeBSD cross, since Meson can't figure out `target_machine.kernel()` in that case. Fixes: https://git.lix.systems/lix-project/lix/issues/469 Change-Id: Ia46a64c8d507c3b08987a1de1eda171ff5e50df4
2024-08-13Merge "libutil: Add bindPath function from libstore" into mainArtemis Tosini
2024-08-12Update version to 2.92Jade Lovelace
Change-Id: Ib64d695c50a733e0e739ff193f1ea65ed7cb0a57
2024-08-12release: merge release 2.91.0 back to mainlineJade Lovelace
This merge commit returns to the previous state prior to the release but leaves the tag in the branch history. Release created with releng/create_release.xsh Change-Id: I8fc975f856631dec7fb3314abd436675adabb59c
2024-08-12release: 2.91.0 "Dragon's Breath"2.91.0Jade Lovelace
Release produced with releng/create_release.xsh Change-Id: I2fa79b268c44b5f024dd833ee366d3e83f054af1
2024-08-12release: release notes for 2.91.0Jade Lovelace
Release created with releng/create_release.xsh Change-Id: Ieb6ca02d3cf986b28440fce3792e8c38ce80a33e
2024-08-10README: clarify license to match documentationJade Lovelace
For years both the documentation and nixpkgs have said that CppNix is LGPL-2.1-or-later, not LGPL-2.1-only as is somewhat implied by the README. We are choosing to update the README to match the rest of the references. Related: https://github.com/NixOS/nix/pull/5218 Change-Id: I6a765ae7857a2f84872f80a25983c4c4b2b3b1c1
2024-08-10libutil: deal with Linux systems that do not implement close_rangeJade Lovelace
Seems a little bit Rich that musl does not implement close_range because they suspect that the system call itself is a bad idea, so they uhhhh are considering not implementing a wrapper. Let's just fix the problem at hand by writing our own wrapper. Change-Id: I1f8e5858e4561d58a5450503d9c4585aded2b216
2024-08-10nix: remove explosions if you have a window size less than fourJade Lovelace
Turns out strings do not like being resized to -4. This was discovered while messing with the tests to remove unbuffer and trying stdbuf instead. Turns out that was not the right approach. This basically rewrites the handling of this case to be much more correct, and fixes a bug where with small window sizes where it would ALSO truncate the attr names in addition to the optional descriptions. Change-Id: Ifd1beeaffdb47cbb5f4a462b183fcb6c0ff6c524
2024-08-10build: remove expect as a dependencyJade Lovelace
I was packaging Lix 2.91 for nixpkgs and was annoyed at the expect dependency. Turns out that you can replace unbuffer with a pretty-short Python script. It became less short after I found out that Linux was converting \n to \r\n in the terminal subsystem, which was not very funny, but is at least solved by twiddling termios bits. Change-Id: I8a2700abcbbf6a9902e01b05b40fa9340c0ab90c
2024-08-10fix: check if it is a Real terminal, not just if it is a terminalJade Lovelace
This will stop printing stuff to dumb terminals that they don't support. I've overall audited usage of isatty and replaced the ones with intent to mean "is a Real terminal" with checking for that. I've also caught a case of carelessly assuming "is a tty" means "should be colour" in nix-env. Change-Id: I6d83725d9a2d932ac94ff2294f92c0a1100d23c9
2024-08-09package: remove unused autotools code, empty fileJade Lovelace
I noticed there was some stuff setting configureFlags that definitely do not do anything with meson, so let's rip them out. As for the empty file, it was added when I was thinking I needed a fake C++ target to convince meson to create the necessary dependencies. That was not in fact possible so it should have never been committed. Change-Id: Ied4723d8a5d21aed85f352c48b080ab2c977a496
2024-08-09version: update, and add codenameJade Lovelace
We're going for Dragon's Breath because horrors called dibs on it. It's fine to merge this a little before the final release, since all the dev versions have -pre in them anyway. Change-Id: I763acb2fc1bf76030f7feaed983addf6ae2fdd53
2024-08-09rl-next: add extra context to a few release notesJade Lovelace
This was found while writing the release blog post. Change-Id: Ifd55f308d4d4c831273cbe6ea35d29a38e134783
2024-08-09rl-next: fix incorrect CL list syntaxJade Lovelace
This also fixes the script to not pass pre-commit by failing to parse an int if this mistake is made again. Change-Id: I714369f515dc9987cf0c600d54a2ac745ba56830
2024-08-09libutil: rename and optimize closeMostFDseldritch horrors
this is only used to close non-stdio files in derivation sandboxes. we may as well encode that in its name, drop the unnecessary integer set, and use close_range to deal with the actual closing of files. not only is this clearer, it also makes sandbox setup on linux fast by 1ms each Change-Id: Id90e259a49c7bc896189e76bfbbf6ef2c0bcd3b2
2024-08-09libstore: deprecate the build-hook settingeldritch horrors
implementing a build hook is pretty much impossible without either being a nix, or blindly forwarding the important bits of all build requests to some kind of nix. we've found no uses of build-hook in the wild, and the build-hook protocol (apart from being entirely undocumented) is not able to convey any kind of versioning information between hook and daemon. if we want to upgrade this infrastructure (which we do), this must not stay Change-Id: I1ec4976a35adf8105b8ca9240b7984f8b91e147e
2024-08-09Merge changes Ib7c80826,I636f8a71,I67669b98 into mainjade
* changes: perl: un-autos your conf build: declare all the deps as -isystem darwin: workaround PROC_PIDLISTFDS on processes with no fds
2024-08-09Merge "libexpr: move Value implementations out of eval.cc" into mainQyriad
2024-08-09libutil: allow marking settings as deprecatedeldritch horrors
this is a bit of a hack, but it's apparently the cleanest way of doing this in the absence of any kind of priority/provenance information for values of some given setting. we'll need this to deprecate build-hook. Change-Id: I03644a9c3f17681c052ecdc610b4f1301266ab9e
2024-08-09main: require argv[0]eldritch horrors
sure, linux has been providing argv[0] by default for a while now. other OSes may not be as forthcoming though, and relying on the OS to create a world in which we can just make assumptions we could test for instead is unnecessarily lazy. we *could* default argv0, but that's a little silly. notably we abort instead of returning normally to avoid confusions where a caller interprets our exit status like a Worker build results bitmask. Change-Id: Id73f8cd0a630293b789c59a8c4b0c4a2b936b505
2024-08-09resolve-system-dependencies: remove entirelyeldritch horrors
this hasn't been used since 2020, and hasn't been compiled since may. Change-Id: I865550966630eee6ba18d742ba36f0a90901279d
2024-08-08libexpr: move Value implementations out of eval.ccQyriad
Change-Id: I2ce8a9713533888b3d109a56947156eb3a5ab492
2024-08-08Merge changes I0373ac01,I7b543967,I537103eb into mainjade
* changes: releng: fix the git push releng: clarify/update docs, add instructions after tag Fix is_maintenance_branch heuristic
2024-08-08Merge changes I6358a393,I2d9f276b,Idd096dc9 into mainjade
* changes: clang-tidy: write a lint for charptr_cast tree-wide: automated migration to charptr_cast clang-tidy: enforce the new rules
2024-08-08Merge changes I526cceed,Ia4e2f1fa,I22e66972,I9fbd55a9,Ifca22e44 into mainjade
* changes: sqlite: add a Use::fromStrNullable util: implement charptr_cast tree-wide: fix a pile of lints refactor: make HashType and Base enum classes for type safety build: integrate clang-tidy into CI
2024-08-08clang-tidy: write a lint for charptr_castJade Lovelace
This lets us ensure that nobody is putting in new reinterpret_cast instances where they could safely use charptr_cast instead. Change-Id: I6358a3934c8133c7150042635843bdbb6b9218d4
2024-08-08sqlite: add a Use::fromStrNullableJade Lovelace
There were several usages of the raw sqlite primitives along with C style casts, seemingly because nobody thought to use an optional for getting a string or NULL. Let's fix this API given we already *have* a wrapper. Change-Id: I526cceedc2e356209d8fb62e11b3572282c314e8
2024-08-08tree-wide: automated migration to charptr_castJade Lovelace
The lint did it :3 Change-Id: I2d9f276b01ebbf14101de4257ea13e44ff6fe0a0
2024-08-08util: implement charptr_castJade Lovelace
I don't like having so many reinterpret_cast statements that have to actually be looked at to determine if they are UB. A huge number of the reinterpret_cast instances in Lix are actually casting to some pointer of some character type, which is always valid no matter the source type. However, it is also worth looking at if it is not casting both *from* a character type and also *to* a character type, since IMO splatting a struct into a character array should be a very deliberate action instead of just being about dealing with bad APIs. So let's write a template that encapsulates this invariant so we can not worry about the trivially safe reinterpret_cast invocations. Change-Id: Ia4e2f1fa0c567123a96604ddadb3bdd7449660a4
2024-08-08clang-tidy: enforce the new rulesJade Lovelace
Fixes: https://git.lix.systems/lix-project/lix/issues/241 Change-Id: Idd096dc9ca92ffd4be8c22d293ba5bf2ec48a85f
2024-08-08tree-wide: fix a pile of lintsJade Lovelace
This: - Converts a bunch of C style casts into C++ casts. - Removes some very silly pointer subtraction code (which is no more or less busted on i686 than it began) - Fixes some "technically UB" that never had to be UB in the first place. - Makes finally follow the noexcept status of the inner function. Maybe in the future we should ban the function from not being noexcept, but that is not today. - Makes various locally-used exceptions inherit from std::exception. Change-Id: I22e66972602604989b5e494fd940b93e0e6e9297
2024-08-08refactor: make HashType and Base enum classes for type safetyJade Lovelace
Change-Id: I9fbd55a9d50464a56fe11cb42a06a206914150d8
2024-08-08build: integrate clang-tidy into CIJade Lovelace
This still has utterly unacceptably bad output format design that I would not inflict on anyone I like, but it *does* now exist, and you *can* find the errors in the log. Future work would obviously be to fix that and integrate the actual errors into Gerrit using codechecker or so. Followup issue: https://git.lix.systems/lix-project/lix/issues/457 Fixes: https://git.lix.systems/lix-project/lix/issues/147 Change-Id: Ifca22e443d357762125f4ad6bc4f568af3a26c62