Commit Graph
17726 Commits
Author SHA1 Message Date
Jade Lovelace c1961eb900 dtrace: fix on macOS (except in the package)
The package needs https://github.com/NixOS/nixpkgs/pull/392918

CC: https://git.lix.systems/lix-project/lix/issues/757
Change-Id: Id040a83d845f98fa1093b782cce2a015b5c85d9f
2025-03-26 10:40:50 -07: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
Stanislav AlekseevandLix Systems Gerrit f0fd789f68 Merge "fix: allow access to ca-certs in FODs on darwin" into main 2025-03-24 07:32:12 +00:00
WeetHetandJade Lovelace 692de16113 fix: allow access to ca-certs in FODs on darwin
Change-Id: Id955be88eb5d419d57262d5983841a1e6accee9f
2025-03-23 19:13:44 -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
eldritch horrors 56df5ba164 libutil: remove json-utils.hh
we can merge it into json.hh instead.

Change-Id: Ic40c25fa759bf52bb69eae5d7c0597f260fd94a6
2025-03-23 22:29:58 +00:00
eldritch horrors dd7cb01708 libutil: remove json-impls.hh
we can do this much better now that we own the serializers.

Change-Id: I531ed44a7b6feac42ffd76719002b78488317d1a
2025-03-23 22:29:58 +00:00
eldritch horrors 45017f7508 libutil: specialize nix::JSON
we want to own this specialization fully so we can change the default
serializer behavior without also forcing downstream users of our code
to use the same behavior. it'll also let us do things we cannot do in
regular nlohmann::json, such as selectively enabling serialization of
enums as integral types, or using `to_json`/`from_json` overloads for
not-default-constructible types instead of serializer specializations

Change-Id: I91a1db362e37d654090f1824b1cd3ce783d32134
2025-03-23 22:16:30 +00:00
eldritch horrors f7d1a6ba8b libutil: extend json_avoids_null to floats and enums
Change-Id: Ief80c03ca244fa4d3fd9dc1792f49b8b2802839e
2025-03-23 20:42:39 +00:00
eldritch horrors 19d7c8352e treewide: add nix::JSON
this will become a proper specialization of `nlohmann::basic_json` soon.
specialing basic_json will let us get rid of our `adl_serializer` hacks,
and it'll open the door to better enum serializing behavior without also
forcing all those who use lix as a library to set certain defines (which
may not even be possible depending on how those users use json already).

Change-Id: I5228d2b9df581a189552c993363207cfbd20f445
2025-03-23 20:42:39 +00:00
eldritch horrors a186bc5021 treewide: add json forwarder headers
this doesn't do much, just wrap a few nlohmann headers in headers of our
own (and delete includes we don't need because they're transitively seen
by other includes). doing this now will make the next change much nicer.

Change-Id: I166933102ea86bb5322ebbf9ba9411f96032a53b
2025-03-23 20:42:39 +00:00
eldritch horrors 09769bbf41 treewide: remove unused nlohmann includes
Change-Id: I261e4bd4c859eb3924202e690331c05887aa26b0
2025-03-23 20:42:39 +00: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
Ilya KandLix Systems Gerrit 6059cbb031 Merge "editline-lix: drop patch that's now included in nixpkgs" into main 2025-03-22 05:45:32 +00:00
Jade Lovelace f695aa2bd2 UX: Show users SRI hashes everywhere instead of base32
This is *just* in output messages that look relatively like the FOD
failure message. It's not great that we inconsistently use the old
format in random places.

Change-Id: I4b9ce73a98a3a50c924cfe1d7cded42f3756df6b
2025-03-21 13:30:41 -07:00
Jade Lovelace b22bee91f5 fix!: file type flake inputs are always recursive hashed
Well that is a mess. I don't like breaking derivation compatibility,
but I like non-deterministic evaluation much less.

We can break compat if we own up to it, which this does.

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

Change-Id: Ic9e2407393f1d42c2be604f80b4aa11bc872bc23
2025-03-21 13:19:15 -07: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
5339ffb234 fix: split macos sandbox profile to avoid size errors
Fixes: https://git.lix.systems/lix-project/lix/issues/752
Fixes: https://git.lix.systems/lix-project/lix/issues/718

Co-authored-by: Poliorcetics <poliorcetics@users.noreply.github.com>
Change-Id: Icfa95ffd40f5a60f67e14148924bc77b42232e19
2025-03-21 18:52:43 +00:00
K900 3936f9b5de editline-lix: drop patch that's now included in nixpkgs
Change-Id: Ib53e6bb5e83f6bf163b29357712cd624b2c24057
2025-03-21 09:45:56 +03:00
Justin ! 2491b7cc21 flake: add note about gerrit wiki section in the welcome message
Change-Id: I756079aea6909bb95667dbae4ec4f692da2b32cc
2025-03-19 15:04:26 -04: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
Jade Lovelace ed7c89790e fix: do not test non-presence of flakes from a subdirectory of lix src
Yeah, we could have seen that one coming, it's kind of on the nose,
really.

Fixes: https://git.lix.systems/lix-project/lix/issues/748
Change-Id: I9e89f73ed89105338343fdecd615e398fc758e89
2025-03-18 12:40:10 -07:00
eldritch horrors 27d5209f4d libutil: fix copyNAR not reading the whole nar when dropped early
if a copyNAR generator was not drained to completion it would not read
the full nar data from its source. this could happen if the copier was
passed to parseAndDump wrapped as a source because copyNAR would yield
nar metadata *before* it had read it, and GeneratorSource will drain a
generator fully *only* if the source is allowed to throw EndOfFile. in
the parseAndDump case this never happened because parseAndDump expects
to be given an unterminated stream, and thus the combination left some
nar metadata in the input Source, breaking the remote store protocols.

fixes #732

Change-Id: Ia59a53375992bfcdb7bc6b37764ca779622bc8f7
2025-03-18 19:32:58 +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
rebecca “wiggles” turnerandLix Systems Gerrit f963bd8295 Merge "getFileContents: Remove unused StringSink" into main 2025-03-18 18:17:22 +00:00
rebecca “wiggles” turnerandLix Systems Gerrit 8934771335 Merge changes I23c99755,I45306148 into main
* changes:
  Remove static initializers for `CommandRegistry`
  RegisterCommand -> CommandRegistry
2025-03-18 18:17:03 +00: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
Jade Lovelace 24e413c147 release-notes: add some for gc gremlins
Originally was in cl/2687 but that CL got canned.

Change-Id: Ib504e263d72669f2418ef02d624bcba26b169622
2025-03-18 10:50:23 -07:00
Mario RodasandLix Systems Gerrit 42541e030c Merge "Fix broken links in documentation" into main 2025-03-18 17:33:31 +00:00
Mario RodasandLix Systems Gerrit dc69d64bff Merge "Fix typos in documentation" into main 2025-03-18 17:32:53 +00:00
jadeandLix Systems Gerrit 6e6ff58272 Merge "feat!: remove experimental repl-flakes" into main 2025-03-18 16:02:55 +00:00
Tom Hubrecht a5e2376350 documentation: Explain how a float will be transformed into a string
`prim_toString` uses `state.coerceToString`, which in turns defers to
`std::to_string` for floats, which 'Converts a floating point value to a
string as if by std::sprintf(buf, "%f", value)'.
Finally, the `%f` specifier 'Converts floating-point number to the
decimal notation in the style [-]ddd.ddd. Precision specifies the exact
number of digits to appear after the decimal point character. The
default precision is 6.'

Closes #747

Change-Id: I42339651005d20f272459cf9f80b274f2076b1e3
2025-03-18 13:42:25 +01:00
eldritch horrors 3ed99ad26e n-e-j: use full lix warning config
this would've caught the missing aio await. also disable some rather
annoying deprecation and missing initializer warnings in dev builds.

Change-Id: Ibbb9dfc67eada0e7843081b669b7c8726a02ec29
2025-03-18 09:13:11 +00:00
eldritch horrors 274933c729 n-e-j: add missing aio block on Store::queryMissing
Change-Id: I7c2350d2bf0d729d26f67a2b2181b2ebc7efb4f8
2025-03-18 09:13:11 +00:00
Mario Rodas 1da97ab24e Fix broken links in documentation
Change-Id: I582341a001d9541db82794eb64ddfc32c6582b83
2025-03-18 04:20:00 +00:00
Mario Rodas 992866bc91 Fix typos in documentation
Change-Id: I93c3801290d03244ea8db96679d002589ae90b74
2025-03-18 04:20:00 +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
KFearsandJade Lovelace 2c21882767 feat!: remove experimental repl-flakes
This is a backport of CppNix PR 10299

Fixes #557

Change-Id: I848e8c5af4bde09afba053a5911fbbd54004fbb8
2025-03-17 16:01:53 -07: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
Jade Lovelace 523965697d post-build-hook: don't emit config settings that aren't overridden
This is a redesign from 9b1f3cbc13 where
this was introduced.

I deleted the AbstractConfig::toKeyValue since it was conspicuously and
obviously broken for two years since 450e5ec618.
I asked myself if anyone was using it, given that it only emitted
settings that were aliases (broken!), and found that nobody used it.

The motivation for this change is the same for only emitting overridden
settings to the protocol: the nix inside there may not be able to parse
our defaults, as is the case of CppNix since the consensual
accept-flake-config was added to Lix.

Fixes: https://git.lix.systems/lix-project/lix/issues/739
Change-Id: Ib9874a52137f1f22220c25bcfa2425a4802509c7
2025-03-17 15:25:52 -07:00
eldritch horrors 6aff96d9cd fix uint64_t-to-size_t narrowing for 32bit systems
fixes #733

Change-Id: Ib0f4d90e32c81f0bd1b7ccacb576b867bfa59690
2025-03-17 23:11:58 +01:00
jadeandLix Systems Gerrit 8c5a1d54d9 Merge "logging: always print post build hook logs" into main 2025-03-17 21:30:32 +00:00
Rebecca Turnerandeldritch horrors b844ef37fb getFileContents: Remove unused StringSink
In cl/1549, this function was changed from calling `getFile(path, sink)`
to returning `getFile(path)`. As a result, the `StringSink` is no longer
used. However, the sink was still being allocated.

Change-Id: I26c8556f20bc4f922912d8a921e8f47aa2bf975e
2025-03-17 19:15:15 +00:00
Jade Lovelace d857424488 release-notes: note the flake.lock fix
Change-Id: I1c5f7a5cba12da1bfb2896ffc04ec89862cb346d
2025-03-17 12:07:29 -07:00