Commit Graph
17871 Commits
Author SHA1 Message Date
eldritch horrors 5f723e96e6 libstore: flatten {,Single}{Built,Derived}Path
only dynamic derivations could produce a non-opaque drvPath. since
dynamic derivations are no longer supported we can have drvPath be
opaque at all times, simplifying downstream code significantly and
making quite a few methods unnecessary. discardOutputPath was only
called on drvPath members anyway and thus reduces to a copy, other
operations at the very least are no longer recursive. some vestige
of dynamic derivations remains in DerivedPathMap though (for now).

Change-Id: Ifb4ad53a3c67800be5a62540068c8279d4ae0046
2025-05-12 13:37:54 +02:00
eldritch horrors 8a539424c8 libexpr: drop support for dyn-drv string context
string context doesn't need any tests because it's never persisted or
shown to the user. getting rid of recursive string context means that
the context string parsers can be a lot simpler from here on forward.

Change-Id: I58443679ad76c0f28ea5f4eb8bfb3874f270e764
2025-05-12 13:37:54 +02:00
eldritch horrors a490e2d946 libstore: remove ability to read or write dyn-drvs
as with impure derivations it is still possible to garbage-collect
existing xp-dyn-drv derivations. we once again don't introduce any
new kinds of errors, we only change the dynamic type of exceptions
from MissingExperimentalFeature to UnimplementedError (although we
do throw FormatError when reading xp-dyn-drv derivations now, that
seems to make a little more sense than "feature not implemented").

Change-Id: Ic26e5b6c9c9e2533093e27f6cf901dc9db57c83e
2025-05-12 13:37:54 +02:00
eldritch horrors 5ae8ac84ea libstore: remove dyn-drvs remote store error hack
with dynamic derivations gone this code will never run again.

Change-Id: I7673a81269c33e62c6c184d33cbc9f3ba0079bee
2025-05-12 13:37:54 +02:00
eldritch horrors 936ac14f1a libexpr: disallow creation of text-hashed derivation outputs
only dynamic derivation produce text-hashed derivation outputs. toFile
produces text-hashed store paths, so we cannot remove text hashing now
without breaking stores, but we can disallow it in derivation outputs.

Change-Id: I95ff9882a59153a7d5fd509f5c9fd85925f30d02
2025-05-12 13:37:54 +02:00
eldritch horrors b8b05d4da4 libexpr: remove dynamic derivation eval support
Change-Id: I8bbdaa280f634bafd5abd7034a605564f45978c0
2025-05-12 13:37:54 +02:00
eldritch horrors 540071dd77 cli: disallow dynamic derivations
with impure derivations gone we move on to dynamic derivations. this too
is not done in a single commit because dynamic derivations are invasive,
modifying semantics of all references to derivation output paths and all
derivation dependency calculations. removing dynamic derivations cleanly
is made significantly harder by the multiple did-you-mean-sum types, aka
"wrappers for std::variant", holding all derivation outpath information.

Change-Id: Ice7a7700c7b54c6a6061d4beb322b4175923d27a
2025-05-12 13:37:54 +02:00
Lily Ballard e4b48ca3f0 version.json: 2.93.0 -> 2.94.0-dev
Change-Id: Id00000000f2c82a2c5cedd4e962521a34436d45d
2025-05-11 16:51:25 -07:00
eldritch horrors 18aebab9b6 libstore: remove unused resolveDerivedPath overload
Change-Id: Iaaeb688d601a21c817fb0449faf9541ea8e0301a
2025-05-11 21:16:36 +00:00
YurekaandLix Systems Gerrit b2b519a3af Merge "lix-doc: remove meson pre-1.5 hacks" into main 2025-05-11 19:14:44 +00:00
eldritch horrors 7bbe6fc47f libstore: remove impure-drvs feature
no documentation seems to have existed for this feature.

Change-Id: I3ec8afd9aeedbff1cc5edabc9074df33dae7d357
2025-05-11 17:27:05 +02:00
eldritch horrors be07629820 libstore: remove DerivationType::Impure
all derivations are now pure again, making isPure a constant function.

Change-Id: I2c65a7b6c8255beb97e2bdd280e4b11e39cb4387
2025-05-11 17:27:05 +02:00
eldritch horrors ae98420772 libstore: drop support for representing impure outputs
nothing can create, or even handle, them any more.

Change-Id: I5ef80129d6b734e65633df6eb9f161ffd31d1327
2025-05-11 17:27:05 +02:00
eldritch horrors 2f9a4a71aa libstore: drop support for reading impure derivations
writing them is technically still supported because what makes a
derivation impure is entirely specified by magically named data,
but without derivationStrict being able to pass these through to
libstore there is no way (besides reading existing files) to get
any new impure derivations into an existing store. it will still
be possible to garbage-collect existing impure derivations since
the gc process does not need to read them as derivations, and we
are not introducing any new kinds of unsupported-feature errors.

Change-Id: I648f53129ce67ee2b48d0591219759812dd557da
2025-05-11 17:27:05 +02:00
eldritch horrors 75f234d84b libexpr: remove impure derivation creation support
Change-Id: I58f481c188c6a6e99d226b4862508cef853b7571
2025-05-11 17:27:05 +02:00
eldritch horrors 6599be1a9f cli: disallow impure derivations
we don't remove the entire feature in one go to make review easier.
impure derivations are rather unintrusive on their own, at least if
we compare them to dynamic or ca derivations in general, so we will
be done with this soon. as it stands impure derivations cannot work
without ca derivations, and those we *really* want to leave behind.

Change-Id: I4f01d8d758b2c85dcd6c3078304b5ee1b52f65b0
2025-05-11 17:26:55 +02:00
Commentator2.0andLix Systems Gerrit 1da9c0261e Merge changes I6830c2fc,Ib88565a1,I0b280587 into main
* changes:
  functional2: Added ruff formatter
  functional2: use loggers
  fix codestyle of functional2
2025-05-10 20:49:43 +00:00
Commentator2.0 b17502088d functional2: Added ruff formatter
Ruff is used to enforce our code-style for the python parts of the
reposity, similar to clang-tidy for the cpp parts.

This includes a pre-commit hook to format code before it is committed
When "unfixable" - i.e. no autoformatting is available - the commit is
rejected

resolves #812

Change-Id: I6830c2fc29ae86337ec18f2b0e3565fac66c5523
2025-05-10 22:14:10 +02:00
Commentator2.0 01985e5add functional2: use loggers
Use logger in favor over print statment.
This is explicitly supported and encuraged by pytest, which also allows
for capturing logs separate from stdout calls, which is handy for when
e.g. lix code calls out to stdout to keep those differentiated from test
output

Change-Id: Ib88565a1663da3b77ca6b95f8edf644eafb4a99d
2025-05-10 21:13:45 +02:00
Commentator2.0 427696a58d fix codestyle of functional2
Fixing up codestyle issues found within functional2 for later adding
ruff formatter

Change-Id: I0b280587c8243137184091a6d36df3dfe7568eb7
2025-05-10 21:13:45 +02:00
eldritch horrors d8e2f53d07 deprecate CA, dynamic, and impure derivations
ca derivations are what we're really after, but dynamic derivations
must also go because they depend on ca derivations. we can't easily
implement dynamic derivations any other way, so we remove them too.
impure derivations build on the content-addressed infrastructure in
ways we cannot easily detangle, so they too must go for time being.

see #815

Change-Id: If61371736dfd89cc71a1b2ae5a005757c3cb9484
2025-05-10 17:15:26 +00:00
benaryorg fcd967da16 libexpr: fetchGit output documentation
Documentation for the output of `builtins.fetchGit`.
In particular this includes details on the both `lastModifiedDate` and `shortRev` which were not readily apparent.
Recommendations are made on the use of `shortRev`; it is considered stable, yet use is discouraged to avoid compatibility and interoperablity issues.

Fixes fj#814

Change-Id: If65c4f84d8a1569dcab2db07f63e69e4053ab74b
Signed-off-by: benaryorg <binary@benary.org>
2025-05-10 13:43:38 +00:00
eldritch horrors 5917db84aa nix: don't send tarballTtl to the daemon
it's an eval-time only setting, the daemon doesn't use it anywhere. this
is a hack, but until we have a much better settings system we are stuck.

fixes #680

Change-Id: I532088b0279f13da0a0a65c2bd2e5f9d1dfb39da
2025-05-10 12:20:09 +00:00
Linus HeckemannandLix Systems Gerrit a10de1ee56 Merge "build-release-notes: ignore dotfiles" into main 2025-05-10 09:53:56 +00:00
Rebecca Turner dcb0a97000 release: merge release 2.93.0 back to mainline
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: I67db1020490da19f5cf35b04b9ccfe47cfe829d1
2025-05-09 14:48:06 -07:00
Rebecca Turner df214a1db8 release: 2.93.0 "Bici Bici"
Release produced with releng/create_release.xsh

Change-Id: I4471a4e6d2776d2f347ee6dec04d1c61eb8b1898
2.93.0
2025-05-09 14:48:05 -07:00
Rebecca Turner bb0cdf110e release: release notes for 2.93.0
Release created with releng/create_release.xsh

Change-Id: I5a793e632dae1b6fdd4f743c383aca937b048dfc
2025-05-09 14:47:55 -07:00
Rebecca Turner 7593714154 version.json: 2.93.0-dev -> 2.93.0 "Bici Bici"
Change-Id: Ib6c3df3549f01b04ede8f13bfa378dcefb64b15a
2025-05-09 14:47:21 -07:00
Raito Bezariusandeldritch horrors 3f3060ebed misc/capnproto: patch to avoid monotonic time checks
From time to time, our KVM's CI machine clock goes in a weird direction
during NixOS tests, this is known on certain hardware, e.g. macOS, where
the check is disabled. Cap'n'Proto removed the check everywhere now.

Fixes fj#754.

We can remove the patch once it hits a stable version of Cap'n'Proto.

Change-Id: I4c9be5061c3b244f601486a8ac4521dff44ceb92
Signed-off-by: Raito Bezarius <raito@lix.systems>
2025-05-09 14:17:35 +02:00
eldritch horrors 294c55026c libcmd: don't mention debug env values when added
this can be extremely distracting when running in a repl that has access
to all of nixpkgs from its static env. not only do we print all bindings
in the stack trace, we also print them *again* every time we enter *any*
but the outermost frames. duplicating this environment information isn't
all that useful and mostly just flushes useful information out of sight.

fixes #816

Change-Id: I027e6a565e82663275e21333bb1d00d498cd4127
2025-05-09 11:51:39 +00:00
Commentator2.0andLix Systems Gerrit 8e832006eb Merge "move nix fixture to own file" into main 2025-05-09 11:15:52 +00:00
Commentator2.0andLix Systems Gerrit 1fba1eec58 Merge "Added functions for copying files into tempdir for declarative testing without side effects" into main 2025-05-09 11:15:11 +00:00
kfearsoffandLix Systems Gerrit 8310367859 Merge "releng: add local environment" into main 2025-05-09 09:05:55 +00:00
KFearsoffandjade 3f811a415b releng: add local environment
This takes the first baby steps towards resolving #765. This first
test/workflow isn't the most useful thing ever, because it doesn't
test the code path for building the manual. Still, it does a decent job
at testing the basic git workflow, and the upload functionality.

Change-Id: I16dd3a39addd6308ad3eb37c2e3dc3466584a4e3
2025-05-09 00:01:22 +00:00
Linus Heckemannandjade b0947777ec build-release-notes: ignore dotfiles
Editors may leave these hanging about, but they're not likely to be
valid release notes

Change-Id: Ie3c9a6e849c6d54514ac25370a8d847a0caf499d
2025-05-08 23:47:59 +00:00
Tom HubrechtandLix Systems Gerrit 885dde9c3d Merge "libstore: Show illegal path references in fixed-outputs derivations" into main 2025-05-08 20:19:15 +00:00
a8da0df671 libstore: Show illegal path references in fixed-outputs derivations
This allows debugging the errors by pinpointing the offenders, instead
of trying to blindly guess what could have possibly gone wrong.

The wording has been improved to better explain the failure.

Closes #530

Co-authored-by: Ben Millwood <thebenmachine+git@gmail.com>
Change-Id: I84ba5d2d81e5d1867f53bd3bc80e615cab9fe274
2025-05-08 20:23:12 +02:00
Yureka 5d0213ac55 lix-doc: remove meson pre-1.5 hacks
Change-Id: I9786d59fc849ae93643d6128ebd598d9de8637f6
Signed-off-by: Yureka <yureka@cyberchaos.dev>
2025-05-08 17:40:38 +02:00
eldritch horrors 8a76db3ab7 libmain: tell kj to use SIGUSR2
fixes #679

Change-Id: Ib7c8afd0192c7329ab3ca90925b1b756b6918c7a
2025-05-08 10:50:10 +00:00
rebecca “wiggles” turnerandLix Systems Gerrit 483f377197 Merge "build-release-notes: more blank lines in output" into main 2025-05-07 22:12:17 +00:00
Rebecca Turner 7ae9480d94 build-release-notes: more blank lines in output
This makes it easier to read and copy/paste the contents when preparing
a Lix release blog post.

The output can be read in
`build/doc/manual/src/release-notes/rl-next-generated.md`.

Before:

    ## Breaking changes
    - Release note 1

      Many thanks to ...
    - Release note 2

      Many thanks to ...
    ## Fixes
    - Release note 3

      Many thanks to ...

After:

    ## Breaking changes

    - Release note 1

      Many thanks to ...

    - Release note 2

      Many thanks to ...

    ## Fixes

    - Release note 3

      Many thanks to ...

Change-Id: Ifea5af1bdce7b2315f3b46c17ebb945e99cfb36f
2025-05-07 14:38:00 -07:00
Commentator2.0 d22b8bd613 move nix fixture to own file
separating the nix fixture from the __init__.py file to increase
readability and overview over the existing fixtures

Change-Id: I7a86cb729942e83a95b9eabbb09563822f3f9e54
2025-05-07 20:02:32 +02:00
Commentator2.0 8fe8147850 Added functions for copying files into tempdir for declarative testing without side effects
Resolves: #601

Change-Id: I79661e96149fa133fe003c698efb47f4c54bbf1a
2025-05-07 16:04:06 +02:00
Linus Heckemann 08d7ddd6ca release notes: name SSH options that are no longer used
When I read the note, I wasn't sure what was meant by connection
sharing. This adds a reference to SSH documentation for clarity.

Change-Id: I1d6e5c53fb6a6fac8380210967f56d86f0333e55
2025-05-07 10:53:12 +02:00
vringar dbdf7c76e6 fix(rl-2.92): fix fmt shim script
Change-Id: I38aed40b3f6916fa7a6991ee0bb056be98d98497
2025-05-05 14:10:57 +00:00
Katalin Rebhan ca8d738df4 Add Boost and libarchive to libutil's public dependencies
Fixes missing include compilation errors.

Boost is included from lix/libutil/result.hh,
libarchive is included from lix/libutil/tarfile.hh

Change-Id: Id0000000e01fc695545d7ef83589ab7c41a92b61
2025-05-03 23:16:48 +02:00
Katalin Rebhan 643b9f3c62 Add missing includes
Change-Id: Id0000000da37acce2438e2a2a3937ffafe6fe90a
2025-05-03 23:16:48 +02:00
helleandLix Systems Gerrit 4e84fd9a00 Merge "Fix various links to anchors in documentation." into main 2025-05-02 11:45:29 +00:00
eldritch horrors c88ce60e25 libexpr: remove unnecessary position parameters
all of these are noPos in all call sites.

Change-Id: I2b74942483cd68dab8cc7c30f582a45a69598c4a
2025-05-02 10:57:15 +00:00
eldritch horrors 2059ccaad3 libexpr: remove positions from primops
they're always noPos and have caused quite some confusion.

fixes #781

Change-Id: I15d4210b1aab6ef5d1caabe2e10b45cf98cc4d47
2025-05-02 10:57:15 +00:00