Commit Graph
100 Commits
Author SHA1 Message Date
jadeandLix Systems Gerrit 9a489c5e78 Merge "fix: Terminate daemons properly on Ctrl-C on macOS" into main 2025-05-02 00:09:43 +00:00
jadeandLix Systems Gerrit fde4121334 Merge "manual: link directly to gerrit for proposing changes" into main 2025-04-30 04:59:41 +00:00
jadeandLix Systems Gerrit 81d4769849 Merge "fix: make test/ headers compliant with styleguide" into main 2025-04-10 16:25:52 +00:00
Jade Lovelace c0de512e14 fix: make test/ headers compliant with styleguide
These were not included in that check. Beats me as to why.

Change-Id: Ib44c7f0b10672359026f95daeb088039cf6df4eb
2025-04-09 23:46:41 -07:00
jadeandLix Systems Gerrit 9c2dba4ee2 Merge "Revert "libstore: don't use curl decompression support"" into main 2025-04-09 16:01:37 +00:00
jadeandLix Systems Gerrit 7bf3d0fa2a Merge changes Iaa962f04,I19480ab0 into main
* changes:
  MonitorFdHup: introduce a test
  tests: fix the fmt.cc test
2025-04-05 17:12:48 +00:00
Jade Lovelace cbaf1bb446 manual: link directly to gerrit for proposing changes
This is, well, interesting. It's the same "edit" button you see on
Gitiles, and upon clicking it, without confirmation, it makes a new CL
and dumps you directly into the editor for the file in question.

I guess if you click it by accident you can just abandon or delete the
CL so it's like, fine. A bit of fascinating UX design here.

Change-Id: I765a1f1fc6d94b171878dde7b01fc621adc00180
2025-04-01 20:28:06 -07:00
jadeandLix Systems Gerrit 5a7e9e1746 Merge "MonitorFdHup: shorten loop delay" into main 2025-04-01 16:10:03 +00:00
jadeandLix Systems Gerrit 80348f7411 Merge "docs: document unsafeGetAttrPos" into main 2025-03-27 00:51:29 +00:00
jadeandLix Systems Gerrit f270d3ebe0 Merge changes Ib81a5db1,Ib6d68594,Id91e1fd4 into main
* changes:
  docs: document the cursed file syntax for new CLI
  docs: document the cursed file syntax for old cli
  doc preprocessor: support indent directives
2025-03-26 16:05:26 +00:00
jadeandLix Systems Gerrit 4181796ed2 Merge changes I0f5d9912,I442f16c7 into main
* changes:
  observability: add the first USDT probe
  tree-wide: put in more keep-sorted
2025-03-24 16:37:28 +00:00
Jade Lovelace 12bf0b6be6 MonitorFdHup: shorten loop delay
Apparently this is sometimes a problem for tests containing race
conditions, since it caused the daemon processes to stick around for a
second. Doesn't make writing such tests any less racey and foolish, but
we can stop doing the silly thing regardless.

CC: https://github.com/NixOS/nix/pull/12714#discussion_r2009265904
Change-Id: Iad6e55cf78c4a4517082194fa00a30d921224457
2025-03-23 19:00:23 -07:00
Jade Lovelace cad275307e observability: add the first USDT probe
USDT probes are statically defined trace points that have nearly zero
disabled-probe effect, i.e. we can put them in hot paths.

The use case for these is both similar and dissimilar to Rust tracing:
We still need better logging and a better structured rust-tracing
looking thing, but probes allow for quite easy programmable interactive
tracing in production, which we also care a lot about.

This CL comes with a perfunctory trace point in
libstore/file-transfer.cc for reading data out of the curl buffer. This
was mostly thrown in there so that I could see what the buffer sizes of
this were, and maybe be able to instrument the perf of the curl usages
in Lix in the future.

Fixes: https://git.lix.systems/lix-project/lix/issues/727
Change-Id: I0f5d9912d76bf3d6923bf53ebfd9b8d6c6e70aea
2025-03-23 18:37:47 -07:00
Jade Lovelace b037258836 tree-wide: put in more keep-sorted
Change-Id: I442f16c7116f603de74004fbeccf23ae32b38e69
2025-03-23 18:22:46 -07:00
jadeandLix Systems Gerrit 53b41a7f9b Merge "UX: Show users SRI hashes everywhere instead of base32" into main 2025-03-23 17:46:11 +00:00
jadeandLix Systems Gerrit 3f45d5e020 Merge "fix!: file type flake inputs are always recursive hashed" into main 2025-03-23 17:45:41 +00:00
jadeandLix Systems Gerrit 3e201a8da5 Merge "fix: split macos sandbox profile to avoid size errors" into main 2025-03-21 20:16:37 +00:00
jadeandLix Systems Gerrit 3fcf823a86 Merge "fix: do not test non-presence of flakes from a subdirectory of lix src" into main 2025-03-18 20:03:40 +00:00
jadeandLix Systems Gerrit 430bcc482c Merge "release-notes: add some for gc gremlins" into main 2025-03-18 20:02:25 +00:00
jadeandLix Systems Gerrit be4ab653eb Merge "fetchTree: make invisible when not available, sorta document" into main 2025-03-18 19:32:12 +00:00
Jade LovelaceandJade Lovelace fcea7379d3 fetchTree: make invisible when not available, sorta document
Documenting fetchTree is an exercise in frustration because of the sheer
amount of stringly typed everything in it. I do not know which fields
exist without reading the entirety of libfetchers. However, we can write
something slightly perfunctory but at least perhaps somewhat helpful
documentation-wise.

Fixes: https://git.lix.systems/lix-project/lix/issues/609
Change-Id: I991391b53fcd69172dbc7efb9d384e62bc847b91
2025-03-18 11:34:28 -07:00
jadeandLix Systems Gerrit a20a1e9692 Merge "libstore: move case hacking to the FS interaction code" into main 2025-03-18 17:56:53 +00:00
jadeandLix Systems Gerrit 6e6ff58272 Merge "feat!: remove experimental repl-flakes" into main 2025-03-18 16:02:55 +00:00
jadeandLix Systems Gerrit 5243a6f8b4 Merge "fix uint64_t-to-size_t narrowing for 32bit systems" into main 2025-03-18 01:42:59 +00:00
jadeandLix Systems Gerrit ea4cf48879 Merge "post-build-hook: don't emit config settings that aren't overridden" into main 2025-03-17 23:31:32 +00:00
jadeandLix Systems Gerrit 15c6679daf Merge "release-notes: note the flake.lock fix" into main 2025-03-17 23:02:44 +00:00
jadeandLix Systems Gerrit 41e10862cb Merge "fix: bad error message for nix store delete --ignore-liveness" into main 2025-03-17 22:33:51 +00:00
jadeandLix Systems Gerrit 8c5a1d54d9 Merge "logging: always print post build hook logs" into main 2025-03-17 21:30:32 +00:00
jadeandLix Systems Gerrit 3cfc8be580 Merge changes I6a83bdb3,If4ee20c3 into main
* changes:
  README: link to the manual
  plugins: support nix_plugin_entry, do some minor reworks
2025-03-17 18:13:31 +00:00
Jade Lovelace d325bec052 README: link to the manual
Well that's silly. We definitely should have done that before.

Change-Id: I6a83bdb3847bb291ac57d30ea28ee33ad7121dbf
2025-03-16 16:54:11 -07:00
Jade Lovelace adf45deeca plugins: support nix_plugin_entry, do some minor reworks
Plugins are already allowed to fail to load, let's be even more tolerant
of them failing to load by ignoring inaccessible ones with a warning.

This change also significantly reworks the docs for plugins.

This is a tiny extremely partial backport of the C API at
https://github.com/NixOS/nix/pull/8699.

Fixes: https://git.lix.systems/lix-project/lix/issues/740
CC: https://git.lix.systems/lix-project/lix/issues/359

Change-Id: If4ee20c3daaf26c8184a415eef3e20ca5b5e7aef
2025-03-16 16:43:54 -07:00
jadeandGerrit Code Review 85d614538f Merge "releng: workaround awscli breaking garage by changing checksum algo" into main 2025-03-14 18:22:23 +00:00
Jade Lovelace 0f4c5b3b8a releng: workaround awscli breaking garage by changing checksum algo
We use https://garagehq.deuxfleurs.fr for https://docs.lix.systems,
https://releases.lix.systems, https://cache.lix.systems. It's generally
great, but AWS doesn't, erm, care, about other implementations and broke
their client library.

We already ran into
https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/824, which was
mitigated by a garage upgrade to create a new error. These bugs were
what got us:
- https://github.com/boto/boto3/issues/4392
- https://github.com/aws/aws-cli/issues/9214

Error:
upload failed: release/manual/.nojekyll to s3://docs/manual/lix/nightly/.nojekyll An error occurred (InvalidRequest) when calling the PutObject operation: Bad request: invalid checksum algorithm

The missing checksum algorithm is CRC32NVME, with a bug filed here:
https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/963

Change-Id: Ib78a89034bf0f2a6773fc505a347b2aadb775e93
2025-03-13 15:08:43 -07:00
jadeandGerrit Code Review 20edd45ae8 Merge "releng: Document release validation checks" into main 2025-03-13 17:53:29 +00:00
jadeandGerrit Code Review 99bc6867e8 Merge "daemon: test group membership better on macOS" into main 2025-02-28 22:20:29 +00:00
jadeandGerrit Code Review c75616d185 Merge "build-release-notes: ban unprefixed issue numbers" into main 2025-02-27 20:01:37 +00:00
jadeandGerrit Code Review 6588f8796b Merge "fix: flakes now obey --eval-system" into main 2025-02-26 22:23:56 +00:00
Jade Lovelace 29f5ce07db fix: flakes now obey --eval-system
This required changing an excessive number of places since flakes code
is a delicious bowl of copy pasta.

I didn't change all of the usage sites since some of them run things on
the local machine and you actually want it to be the real system there.

Nevertheless, we probably should have the daemon do something much
different when it receives a `system` setting:
https://git.lix.systems/lix-project/lix/issues/694

Fixes: https://git.lix.systems/lix-project/lix/issues/692
Fixes: https://git.lix.systems/lix-project/lix/issues/673
Fixes: https://github.com/NixOS/nix/issues/11359
Change-Id: I55e696c09794d2520b60238a84829c98fcad7ccc
2025-02-26 12:05:07 -08:00
Jade Lovelace 5687881a1f crash handling: remove catch-alls in main, crash hard
This is because C++ exceptions are very tricky, and most notably,
because a catch is run *after* things have been cleaned up, and we don't
*want* them cleaned up if we want usable stack traces.

    $ nix nar
    Lix crashed. This is a bug. We would appreciate if you report it along with what caused it at https://git.lix.systems/lix-project/lix/issues with the following information included:

    Exception: std::runtime_error: lol
    Stack trace:
     0# nix::getStackTrace[abi:cxx11]() in /home/jade/lix/lix4/outputs/out/lib/liblixutil.so
     1# 0x00007D58FC909292 in /home/jade/lix/lix4/outputs/out/lib/liblixmain.so
     2# 0x00007D58FC49220A in /nix/store/ybjcla5bhj8g1y84998pn4a2drfxybkv-gcc-13.3.0-lib/lib/libstdc++.so.6
     3# 0x00007D58FC492275 in /nix/store/ybjcla5bhj8g1y84998pn4a2drfxybkv-gcc-13.3.0-lib/lib/libstdc++.so.6
     4# 0x00007D58FC4924C7 in /nix/store/ybjcla5bhj8g1y84998pn4a2drfxybkv-gcc-13.3.0-lib/lib/libstdc++.so.6
     5# 0x00005B9799B45036 in nix
     6# 0x00005B9799B3697F in nix
     7# 0x00005B9799B3924D in nix
     8# nix::handleExceptions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void ()>) in /home/jade/lix/lix4/outputs/out/lib/liblixmain.so
     9# 0x00005B9799B38D2B in nix
    10# 0x00007D58FC1E227E in /nix/store/wn7v2vhyyyi6clcyn0s9ixvl7d4d87ic-glibc-2.40-36/lib/libc.so.6
    11# __libc_start_main in /nix/store/wn7v2vhyyyi6clcyn0s9ixvl7d4d87ic-glibc-2.40-36/lib/libc.so.6
    12# 0x00005B9799A7CF05 in nix

    zsh: IOT instruction (core dumped)  nix nar

Sadly our symbolizer sucks. But that's, well, improvable. The core dump
is at least much more useful now.

Obviously with async things being full of catch-alls, we have the same
problem. I think we might want to change those in another commit to only
catch nix::BaseError subclasses and let the rest fall into a noexcept
function so it will crash hard.

The daemon also could use this treatment, but I would like to be able to
send the client the crash message in phase 1 unwind. No idea how to
achieve that; all the ways I have seen are heinous.

Fixes: https://git.lix.systems/lix-project/lix/issues/698

Change-Id: I0b61f2e7a7003b92c39b1a0e90756979e5e59cb4
2025-02-24 17:26:49 -08:00
jadeandGerrit Code Review 33f13385f6 Merge changes Iba04f70f,I6b5bd980 into main
* changes:
  rl-next: fix mistake in issue number
  crash handling: log to syslog also
2025-02-23 07:56:32 +00:00
jadeandGerrit Code Review 595778e2d2 Merge "releng: use aws s3 sync --delete when uploading manual" into main 2025-02-23 02:37:05 +00:00
Jade Lovelace 392ba80bbd rl-next: fix mistake in issue number
Should be fj#foo for a lix issue.

Change-Id: Iba04f70fd8258e5c54a2c5b92a41472f8fb68376
2025-02-22 18:33:51 -08:00
Jade Lovelace 5468d340c3 crash handling: log to syslog also
This is mostly to deal with fatal errors in NixOS tests, but it's useful
for all cases; assertion failures landing in syslog would be nice too,
but that's not as easy to do.

CC: https://git.lix.systems/lix-project/lix/issues/693

Change-Id: I6b5bd9800db3f5affe33f2946ea218e4a78f0c07
2025-02-22 18:33:51 -08:00
jadeandGerrit Code Review 148f4eefe9 Merge changes Ia8ac6af0,I9f478750,I7d594835 into main
* changes:
  deps: backport capnproto promise nodiscard PR
  libstore: await promises instead of discarding
  libutil: fix some thread pool bugs
2025-02-22 01:47:10 +00:00
jadeandGerrit Code Review e7aa55ca34 Merge "nix-eval-jobs: passthru nix" into main 2025-02-21 02:35:53 +00:00
jadeandGerrit Code Review e4650caa69 Merge changes I75b828ae,I4baa5721,I68798300 into main
* changes:
  fix: pre-build-hook did not run when useChroot == false
  libstore/build: say what was failing when pre/post build hooks fail
  daemon: complain much louder about unknown std::exception instances falling out
2025-02-18 17:02:09 +00:00
Jade Lovelace c9b2e8b1d9 fix: pre-build-hook did not run when useChroot == false
It turns out there is actually some history here.
Eight years ago, in 7f5b750b40, the
pre-build-hook condition got changed to check that useChroot is true
(which we will put down as "eelco making a mistake" because it makes no
sense) and that this->drv was a Derivation (as opposed to a
BasicDerivation as would be the case if the derivation was not present
on disk). The intent of this change was that pre-build-hook would not
run when the derivation doesn't exist, so that some hydras would not
explode.

However, this broke later when both cases became Derivation such that
AFAICT it will always run it if useChroot is true, which is absolutely
not the intended behaviour, but it is a reasonable interpretation as
well, just inconvenient for certain pre-build-hook usages.

So, I think the safest and most compatible behaviour is to run the
pre-build-hook but not guarantee that the derivation actually exists on
disk, since it already didn't run in many cases. Maybe the more correct
way is to actually write out the derivation if we are running a
pre-build-hook, but post-build-hook has exactly the same situation and
it's expected, so idk.

Fixes: https://git.lix.systems/lix-project/lix/issues/674
Change-Id: I75b828ae2a07ab373f44083507eb243459bd081d
2025-02-17 16:05:06 -08:00
Jade Lovelace 24a6759940 libstore/build: say what was failing when pre/post build hooks fail
Fixes: https://git.lix.systems/lix-project/lix/issues/638
Change-Id: I4baa5721e79b425c37b9e7057ba4989003bced82
2025-02-17 15:39:53 -08:00
Jade Lovelace 8a5d1c45d2 daemon: complain much louder about unknown std::exception instances falling out
This made debugging https://git.lix.systems/lix-project/lix/issues/681 a
pain in the neck. This is partially a fix, in a certain sense, for
https://git.lix.systems/lix-project/lix/issues/379, but that one also
addresses expected exceptions from the daemon.

Another instance of this error generation site being shit recently:
https://git.lix.systems/lix-project/lix/issues/638

I don't know how we should improve that particular site but we
definitely should complain about uncaught std exceptions with type ids.

Change-Id: I68798300448ee9ebae65c6469ba69e3f933b2895
2025-02-17 14:42:35 -08:00
Jade Lovelace 7d4912bcf9 filetransfer: report errbuf for failing http codes
This was annoying in the case of
https://git.lix.systems/lix-project/lix/issues/662 and it's just an
oversight.

Change-Id: I5af8494dff4621ae2525c28a2c318304545ed665
2025-02-09 13:41:05 -08:00
jadeandGerrit Code Review 06d3c59db0 Merge "Fix crash in debugger mode using with" into main 2025-02-04 16:36:50 +00:00
jadeandGerrit Code Review e529074cb2 Merge "functional2: add missing __init__.py" into main 2025-01-31 03:48:36 +00:00
jadeandGerrit Code Review 0262879b0d Merge changes Iaa096f7d,I48b7c1be into main
* changes:
  functional2: tidy up some of the NAR handling
  functional2: add http server fixture
2025-01-26 02:05:38 +00:00
jadeandGerrit Code Review 5a41803f74 Merge "libfetchers: fix trivial switcheroo of FileInputScheme and TarballInputScheme" into main 2025-01-25 02:06:46 +00:00
jadeandGerrit Code Review 8975a49bec Merge "packaging: add pkg-config dep on kj" into main 2025-01-24 21:02:17 +00:00
Jade Lovelace 478699829a libfetchers: fix trivial switcheroo of FileInputScheme and TarballInputScheme
These are only called when registering the schemes, so reordering them
to the previous order should ensure identical behaviour.

Change-Id: I12ea0e18e6dc897a91ad20cea3a765c0b96ae85e
2025-01-24 19:18:18 +00:00
jadeandGerrit Code Review 402aca87c0 Merge "Revert "libstore: always load localstore public keys"" into main 2025-01-24 02:25:11 +00:00
jade 4b6dbc96c1 Revert "libstore: always load localstore public keys"
Though this is a revert, it also involves fixing the code with new code
and a regression test. The problematic locking that was there before has
been removed, in any case.

This reverts commit ba728e46be.

Reason for revert: regression.
Fixes: https://git.lix.systems/lix-project/lix/issues/647

Change-Id: I326b1a10042ff69afbab38426e042e0dc2224a13
2025-01-23 17:57:52 -08:00
jadeandGerrit Code Review cb19e24a1d Merge "fix(gc): log sudden "path in use" exceptions and recover during GC gracefully" into main 2025-01-23 06:03:33 +00:00
jadeandGerrit Code Review 1fe6064ced Merge "FileTransfer: fix race condition on awaitData" into main 2025-01-22 21:06:31 +00:00
jadeandGerrit Code Review 831e9d62f1 Merge "Release process notes" into main 2025-01-20 19:17:34 +00:00
Jade Lovelace 4cacb5412f version.json: let's begin 2.93.0!
Change-Id: I7fecdba728916de728f3d2d024b543c3fc593c50
2025-01-18 14:10:54 -08:00
Jade Lovelace 6482bee40b Update version to 2.93, I guess 2025-01-18 14:05:17 -08:00
Jade Lovelace 08182f4ed7 flake: update nixpkgs, lix 2025-01-18 14:02:13 -08:00
Jade Lovelace 079528098f release: merge release 2.92.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: I4e4650d96de82b46c35171b3a9fc1e3a6ca8e6a1
2025-01-18 13:04:46 -08:00
Jade Lovelace 9446732466 release: 2.92.0 "Bombe glacée"
Release produced with releng/create_release.xsh

Change-Id: Ife8c3ed7dc44b6ed334e53ec260fd17a931bf55f
2025-01-18 13:04:46 -08:00
Jade Lovelace b5c3c21792 release: release notes for 2.92.0
Release created with releng/create_release.xsh

Change-Id: Ie02e27b7328758727e78c85925e04629cd4d6d14
2025-01-18 13:04:35 -08:00
Jade Lovelace fc8bd88cf4 releng: fix for newer xonsh
Looks like a module rename

Change-Id: I281e41b8781fa5aa75a3bcb6e6907e582f46dcb7
2025-01-18 13:04:20 -08:00
Jade Lovelace 9b2761d66d version.json: codename and remove -dev suffix in prep for 2.92
Change-Id: I30e45aac44e7fd5bd5cfe56a9514cee95b1d4d8b
2025-01-17 19:03:49 -08:00
Jade Lovelace fe79b90055 doc: add some missing release notes for 2.92
Change-Id: I4861f8885aac53ce76322aae0387facfdd5f3e88
2025-01-17 19:03:49 -08:00
Jade Lovelace 9760c00591 clang-tidy: Obliterate FixIncludes check
We have obliterated the support across the build system for these
include paths anywhere, so the codemod is now redundant and can go.

Change-Id: I54082f39752c6aac6429e1c24026211adae8221a
2025-01-16 00:12:57 -08:00
Jade Lovelace bf3ebde25f pkg-config: remove legacy include paths!
This is a breaking change for non-migrated external clients. External
users always need to use <lix/libcmd/foo.hh> type include paths now.

This is as was always planned with the include rearrangement.

Change-Id: I269be91ff9f9cc94d5d3043cf3e0bdf8db1d8edb
2025-01-16 00:12:57 -08:00
Jade Lovelace acbb3cff2d Merge remote-tracking branch 'pennae/path-access' into HEAD
This fixes a bug where flakes do not actually do purity path checks
correctly.

Tested-By: Jade Lovelace <lix@jade.fyi>
Change-Id: If7d131a8e73a5874fb15cfaa0dea3b8811ba35d2
2025-01-13 17:19:54 -08:00
jadeandGerrit Code Review d953e138a2 Merge "fix: macOS build broken on nixos-unstable" into main 2025-01-10 22:23:14 +00:00
jadeandGerrit Code Review cb44fe7c15 Merge changes Ic890f781,I77b2de10,I3202aba0,I6ddc4296,I18776984, ... into main
* changes:
  doc: fix broken table in operators list
  terminal code eaters: implement OSC
  libexpr: significantly improve error messages for bad attr paths
  tests/functional2: add terminal code eater
  tests/functional2: fix occasional pytest haunting
  attr path parser: fix bug in not rejecting empty attr paths, add unparser
2024-12-11 02:28:11 +00:00
Jade Lovelace f51943f171 doc: fix broken table in operators list
Fixes: https://git.lix.systems/lix-project/lix/issues/597
Change-Id: Ic890f781af10fbcab23deae5ab9c10eebfbab070
2024-12-10 15:43:31 -08:00
Jade Lovelace 5530de4673 terminal code eaters: implement OSC
This is a useful piece of functionality to being able to eat URL
hyperlinks, for instance, which is a bug that Lix has while dealing with
terminal output today.

Change-Id: I77b2de107b2525cad7ea5dea28bfba2cc78b9e6d
2024-12-10 15:43:31 -08:00
Jade Lovelace faf00ad022 libexpr: significantly improve error messages for bad attr paths
This commit makes Lix include the summarized content of the value being
indexed when it is bad.

lix/lix2 » nix eval --expr '{x.y = 2;}' 'x.y.z'
error: the value being indexed in the selection path 'x.y.z' at 'x.y' should be a set but is an integer: 2

lix/lix2 » nix eval --expr '{x.y = { a = 3; };}' 'x.y.z'
error: attribute 'z' in selection path 'x.y.z' not found inside path 'x.y', whose contents are: { a = 3; }
       Did you mean a?

lix/lix2 » nix eval --expr '{x.y = { a = 3; };}' 'x.y.1'
error: the expression selected by the selection path 'x.y.1' should be a list but is a set: { a = 3; }

Change-Id: I3202aba0e437e00b4c6d3ee287a2d9a7c6892dbf
2024-12-10 15:43:31 -08:00
Jade Lovelace c0808bd855 tests/functional2: add terminal code eater
I want this for being able to write reasonable expect-test style tests
for oneliners. We will still probably want something like insta for more
complicated test cases where you actually *want* the output in a
different file, but for now this will do.

cc: https://git.lix.systems/lix-project/lix/issues/595
Change-Id: I6ddc42963cc49177762cfca206fe9a9efe1ae65d
2024-12-10 15:43:31 -08:00
Jade Lovelace 93d5221b9b tests/functional2: fix occasional pytest haunting
I don't know what the heck the xonsh module is doing but its obviously
crimes so it has to go. It was never intended to be running here anyway.

Fixes: https://git.lix.systems/lix-project/lix/issues/593
Change-Id: I1877698469392f85884945aaa60987c68c4e0ebc
2024-12-10 13:32:28 -08:00
Jade Lovelace 21ad02c1d0 attr path parser: fix bug in not rejecting empty attr paths, add unparser
The following behaviour was previously present and has been fixed:

lix/lix2 » nix eval --expr '{x."" = 2;}' 'x.""'
{ "" = 2; }
lix/lix2 » nix eval --expr '{x."".y = 2;}' 'x."".y'
error: empty attribute name in selection path 'x."".y'

Change-Id: Iad21988f1191c33a3661c72a6b7f01a8b8b3e6eb
2024-12-10 13:32:28 -08:00
Jade Lovelace 8ddcdfb59c build: fix on x86_64-darwin
Lix requires a non-antiquated macOS SDK, and 24.11 does not yet have a
non-antiquated one as default.

Fixes: https://git.lix.systems/lix-project/lix/issues/588
Change-Id: Iad19c06d7fefe3a736cdcb39ced185e52dcfcbb8
2024-12-10 12:32:42 -08:00
jadeandGerrit Code Review 9a96086381 Merge "tree-wide: fix a pile of lints" into main 2024-12-10 20:29:53 +00:00
Jade Lovelace bdbe3e1304 Fix compilation for latest Lix main 2024-12-06 13:50:43 -08:00
jadeandGerrit Code Review 2a9e560570 Merge "libcmd: munge evalSettings in the right place" into main 2024-12-06 01:25:12 +00:00
Jade Lovelace 53e0b6ecfb tree-wide: fix a pile of lints
Mostly these are bugprone-unused-local-non-trivial-variable.

Also fix instances of:
- bugprone-optional-value-conversion
- bugprone-inc-dec-in-conditions (please check this loop is correct, it
  is the only non trivial code change in here)
- bugprone-unused-return-value (well, by fixing the lint config)

There are three notable changes relating to undefined vars:
- openLogFile ignoring the result. This is because openLogFile does a
  whole bunch of mutation of member variables
- hiliteMatches: i am guessing this is because showing the derivation
  name was unhelpful and it just got changed
- canonPath in NarAccessor: canonPath inside of a thing that is supposed
  to be vfs based cannot possibly be correct, so let's delete it given
  it is unused.

Fixes: https://git.lix.systems/lix-project/lix/issues/584

Change-Id: I887adc9ff28b61f726dcfed197e6796b414c2fcf
2024-12-05 17:13:37 -08:00
Jade Lovelace 9dd58224ea libexpr: rename misleading type alias Bindings::size_t
Calling a custom type size_t is incredibly sneaky and makes all the code
around this extremely context dependent.

Change-Id: Idae684781f45fe615020d8642f12a656ab2c15ad
2024-12-05 12:24:15 -08:00
jadeandGerrit Code Review f116608a20 Merge "libstore: abort all curl transfers on interrupt" into main 2024-11-19 05:03:47 +00:00
jadeandGerrit Code Review 0bec915522 Merge "unnamed threads: Obliterate" into main 2024-11-19 05:02:48 +00:00
Jade Lovelace 519957bd59 unnamed threads: Obliterate
Ever read gdb output and you just kinda get a headache because you have
to infer what a thread is by reading the stack trace? It's not hard, but
we could also just never have to do that again, which is also not hard.

Sample:

(gdb) info thr
  Id   Target Id                    Frame
* 1    LWP 3719283 "nix-daemon"     0x00007e558587da0f in accept ()
   from target:/nix/store/c10zhkbp6jmyh0xc5kd123ga8yy2p4hk-glibc-2.39-52/lib/libc.so.6
  2    LWP 3719284 "signal handler" 0x00007e55857b2bea in sigtimedwait ()
   from target:/nix/store/c10zhkbp6jmyh0xc5kd123ga8yy2p4hk-glibc-2.39-52/lib/libc.so.6

The API design for this is forced by the macOS pthread_setname_np only
being able to change the current thread's name, but if we just conform
everything to that, it works everywhere.

Change-Id: I2b1d6ed41e3c94170cb0b4e73ad66f239ebd9c88
2024-11-18 18:53:40 -08:00
jadeandGerrit Code Review 950c213ddf Merge "feat: better warning for common SSL errors" into main 2024-11-19 02:48:24 +00:00
jadeandGerrit Code Review 33e832ba5a Merge "manual: Make link to install page clickable" into main 2024-11-19 01:47:03 +00:00
Jade Lovelace fbdb177b31 manual: Make link to install page clickable
Closes: https://github.com/lix-project/lix/pull/11

Thanks to xsova for suggesting this.

Change-Id: I5958fa4438f4b83d928e8f309aab9a33fb4cbedd
2024-11-18 16:32:20 -08:00
Jade Lovelace 6a9b66357e pkg-config: add the base lix include-dir as an include-dir
This allows <lix/*> includes to work from external projects not taking
Lix as a buildInput with Nix, but just using pkg-config.

Change-Id: I5b24fd0981344b013beaf406c16988dad17f0edb
2024-11-18 12:31:41 -08:00
Jade Lovelace 13f54451e6 meson: remove the ability to use unqualified includes from inside Lix
These are still supported externally with pkg-config, but this commit
ensures they no longer build internally.

Change-Id: I2fa38f85e43b18f1f1dbcfdb0367de8f192aca2c
2024-11-18 12:31:41 -08:00
Jade Lovelace 103cd44a04 Include rearrangement: rest
Change-Id: If9b5502ff348d358d7007b885e26e98a0d228f39
2024-11-18 12:31:19 -08:00
Jade Lovelace eeaa72b62b Include rearrangement: libexpr
Change-Id: Ib230a3021d544d3ab1376542b73ea1df1a220a3c
2024-11-18 12:22:39 -08:00
Jade Lovelace 94ca95714e Include rearrangement: libstore
Change-Id: I27c83510d9053bb8bdd7eda9ad3a4b77d633056a
2024-11-18 12:22:39 -08:00
Jade Lovelace df0e1993b7 Include rearrangement: libutil
Change-Id: Ibf4ee57e430ce1cd175f994d1db7964c8407ffa7
2024-11-18 12:22:39 -08:00
Jade Lovelace b62cc7b361 meson: prepare for include rearrangement
Context: we have include paths that are "types.hh" and similarly common
names. We currently have these compatibly available as
"lix/libutil/types.hh" externally but *not yet internally*. This is
because we don't have any way for the src directory to appear as
`"lix/"` from inside of Lix: the lix/ include directory is created by
the install process.

The goal of this whole thing is to make it clearer which component of
Lix that files are a part of, which should hopefully help at least a
little bit to new developers. One disadvantage of un-mixing these is
that it will cause some API changes if we ever move a file between
libraries, but that is not very common, and we don't care that much
about external API users.

This was planned for a while and is why we have a FixIncludes check to
begin with.

Personally I don't see a great benefit in rearranging our source code,
and in fact, it would probably be counterproductive:
- Moving the includes into a separate `include/` directory would just
  make developers have to deal with more directories, when we can
  already generate the desired layout through the build process.
- This would also decouple the .cc and .hh files which currently
  conventionally have each others' definitions and declarations
  respectively, right next to each other, making it easier for them to
  feel decoupled and diverge.

Content: Add ../include as an include directory so that lix/ in include
paths will resolve to src/ within Lix itself, just as it does externally
today. This prepares for a further series of commits applying the actual
change to each library one-by-one by accepting both include versions at
once.

This could have been done with ../ and a symlink called lix, but we
would like to not accept libexpr/foo.hh internally for it would be
broken externally, so we need an otherwise empty directory for the
include.

Change-Id: Ideac17faadae2bcea2dffbab34eb27c582ede399
2024-11-18 12:22:39 -08:00