Commit Graph
17865 Commits
Author SHA1 Message Date
Lily Ballard bc5d7ad458 libutil: move filterANSIEscapes tests
This moves the original test suite for `filterANSIEscapes` into the same
file as the newer tests. There is some overlap between the old and new
tests but that doesn't hurt anything so I kept them as-is.

Change-Id: Id00000009919024a5f206ec9a7bc0022541ff612
2025-05-13 19:04:52 -07:00
Lily Ballard 207b5d81bf libutil: handle OSC escapes in filterANSIEscapes()
This teaches `filterANSIEscapes()` how to find the end of an OSC
sequence. It also keeps OSC 8 (hyperlinks) when not instructed to filter
out all escapes, just as it keeps colors.

This also relaxes the parsing of CSI escapes to find the end of the
sequence for invalid sequences, and handles better escapes that don't
start CSI or OSC.

This fixes the repl output for `:doc builtins.fetchGit`.

Fixes: https://git.lix.systems/lix-project/lix/issues/160
Change-Id: Id0000000f2a6956c042c883a4545edf347fa1799
2025-05-13 18:59:08 -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
jadeandLix Systems Gerrit 9a489c5e78 Merge "fix: Terminate daemons properly on Ctrl-C on macOS" into main 2025-05-02 00:09:43 +00:00
helleandjade f659a1e638 Fix various links to anchors in documentation.
These are updates to several links in the documentation that are not
currently pointing to existing anchors in the documentation, these were
found using the unfinished version of the mdbook-linkchecker we are
working on.

Fixes include pointing them to the correct anchor, inserting anchors (in
updated html5 style, though debatable) and in the case of the historical
release notes, removing them, fixing #809.

Change-Id: If4ef89dc89506aa131a764312d97a86179ccd6f5
2025-05-01 21:35:52 +00:00
Jade Lovelace 69ba3c92db fix: Terminate daemons properly on Ctrl-C on macOS
This was an absolute nightmare to diagnose. It turns out there's a
kernel bug: poll with events = POLLHUP will receive an event for NOT
POLLHUP internally in the kernel, delete their event subscription, and
then not receive events for any HUP later. lol! lmao!!

We choose to use plain old EVFILT_READ because the watched fd can be
either a socket or a pipe and it's preferable to eat some spurious
wakeups than have separate paths for those. The alternative is using
EVFILT_SOCK, a private API that's existed for years and which netty
uses for its sockets, but that doesn't work on pipes.

Fixes: https://git.lix.systems/lix-project/lix/issues/729
Change-Id: If72b5d7a39f00320a9acccdbe81121cdb1a04c45
2025-05-01 12:22:27 -07:00
eldritch horrors 6bd6a2416b libexpr: turn debug frames into exprs
this way we don't have to even check whether we need a debug frame when
the debugger isn't enabled. not doing this gives us an eval performance
improvement of roughly 7% on nixos system eval and 2% for `nix search`.

Change-Id: I1cdad3de61f865ea54d6e09d63a281688e828768
2025-05-01 14:28:05 +00:00
eldritch horrors dd2c54d9ad libexpr: generate debug info from a new visitor
Change-Id: I757a9e49dee99b27b0f153ca520c71ee3ecd347f
2025-05-01 14:28:05 +00:00
eldritch horrors 8145c2f5fe libexpr: implement bindVars with a visitor
we can now move debug info generation out of bindVars itself.

Change-Id: I54c88e14d030d2a19f16b57099990f2c3b4334aa
2025-05-01 14:28:05 +00:00