aboutsummaryrefslogtreecommitdiff
path: root/src/libutil
AgeCommit message (Collapse)Author
2023-02-01Merge pull request #7203 from graham33/feature/cpp20Eelco Dolstra
Proposal: Use C++20
2023-01-30Merge pull request #7713 from obsidiansystems/more-rapid-checkRobert Hensing
Add more property tests
2023-01-30Merge pull request #5226 from NixOS/client-side-profilesEelco Dolstra
Move the default profiles to the user’s home
2023-01-30Merge pull request #7087 from ncfavier/referenceablePathsThéophane Hufschmitt
Self-contained outputs
2023-01-30Merge pull request #7645 from ↵Théophane Hufschmitt
typetetris/fix-url-parsing-file-as-application-scheme Fix url parsing for urls using `file+`
2023-01-30Merge branch 'master' into referenceablePathsThéophane Hufschmitt
2023-01-29More property testsJohn Ericson
Also put proper comparison methods on `DerivedPath` and `NixStringContextElem`, which is needed for the tests but good in general.
2023-01-29Allow unit test infra to be reused across libs' testsJohn Ericson
This allows using Arbitrary "instances" defined in libstore-tests in libexpr-tests, something we will leverage in a moment.
2023-01-24Fix 'destructor called on non-final ...' warningGuillaume Maudoux
clangStdenv compiles with a single warning: ``` warning: destructor called on non-final 'nix::PosAdapter' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor] ``` This fixes the warning by making the destructor of PosAdapter virtual, deffering to the correct destructor from the concrete child classes. This has no impact in the end, as none of these classes have specific destructors. Technicaly, it may be faster not to have this indirection, but as per the warning, there is only one place where we have to delete abstract PosAdapter values. Not worth bikesheding I guess.
2023-01-23Test store paths, with property testsJohn Ericson
The property test in fact found a bug: we were excluding numbers!
2023-01-20Fix url parsing for urls using `file+`Eric Wolf
`file+https://example.org/test.mp4` should not be rejected with `unexpected authority`.
2023-01-19Revert "Revert "Merge pull request #6204 from layus/coerce-string""Guillaume Maudoux
This reverts commit 9b33ef3879a764bed4cc2404a08344c3a697a646.
2023-01-18Revert "Merge pull request #6204 from layus/coerce-string"Robert Hensing
This reverts commit a75b7ba30f1e4f8b15e810fd18e63ee9552e0815, reversing changes made to 9af16c5f742300e831a2cc400e43df1e22f87f31.
2023-01-17Move the default profiles to the user’s homeThéophane Hufschmitt
Rather than using `/nix/var/nix/{profiles,gcroots}/per-user/`, put the user profiles and gcroots under `$XDG_DATA_DIR/nix/{profiles,gcroots}`. This means that the daemon no longer needs to manage these paths itself (they are fully handled client-side). In particular, it doesn’t have to `chown` them anymore (removing one need for root). This does change the layout of the gc-roots created by nix-env, and is likely to break some stuff, so I’m not sure how to properly handle that.
2023-01-16Merge pull request #7585 from NixOS/macos-disconnectEelco Dolstra
MonitorFdHup: Make it work on macOS again
2023-01-13Merge pull request #6815 from obsidiansystems/better-wanted-outputsRobert Hensing
`OutputSpec` for `DerivationGoal` and `DerivedPath`, today's `OutputSpec` -> `ExtendedOutputSpec`
2023-01-11Remove default constructor from `OutputsSpec`John Ericson
This forces us to be explicit. It also requires to rework how `from_json` works. A `JSON_IMPL` is added to assist with this.
2023-01-11MonitorFdHup: Make it work on macOS againEelco Dolstra
It appears that on current macOS versions, our use of poll() to detect client disconnects no longer works. As a workaround, poll() for POLLRDNORM, since this *will* wake up when the client has disconnected. The downside is that it also wakes up when input is available. So just sleep for a bit in that case. This means that on macOS, a client disconnect may take up to a second to be detected, but that's better than not being detected at all. Fixes #7584.
2023-01-11Backport getLine tests from lazy-treesEelco Dolstra
2023-01-03`unsafeDiscardReferences`Naïm Favier
Adds a new boolean structured attribute `outputChecks.<output>.unsafeDiscardReferences` which disables scanning an output for runtime references. __structuredAttrs = true; outputChecks.out.unsafeDiscardReferences = true; This is useful when creating filesystem images containing their own embedded Nix store: they are self-contained blobs of data with no runtime dependencies. Setting this attribute requires the experimental feature `discard-references` to be enabled.
2023-01-02Put the --show-trace hint in the logical placeEelco Dolstra
2023-01-02Merge remote-tracking branch 'origin/master' into coerce-stringEelco Dolstra
2022-12-23Fix CanonPath::dirOf() returning a string_view of a temporaryEelco Dolstra
https://hydra.nixos.org/build/202837872
2022-12-20Merge pull request #7451 from edolstra/abstract-posEelco Dolstra
Introduce AbstractPos
2022-12-19Merge pull request #7450 from edolstra/canon-pathEelco Dolstra
Add CanonPath wrapper to represent canonicalized paths
2022-12-13Introduce AbstractPosEelco Dolstra
This makes the position object used in exceptions abstract, with a method getSource() to get the source code of the file in which the error originated. This is needed for lazy trees because source files don't necessarily exist in the filesystem, and we don't want to make libutil depend on the InputAccessor type in libfetcher.
2022-12-12Add CanonPath wrapper to represent canonicalized pathsEelco Dolstra
2022-12-12Simplify loop, feedback from @tfc and @Ericson2314Florian Friesdorf
2022-12-12Show stack trace above error messageFlorian Friesdorf
Save developers from scrolling by displaying the error message last, below the stack trace.
2022-12-12Don't reverse stack trace when showingFlorian Friesdorf
When debugging nix expressions the outermost trace tends to be more useful than the innermost. It is therefore printed last to save developers from scrolling.
2022-12-12CleanupEelco Dolstra
2022-12-12Optimize string concatenationEelco Dolstra
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2022-12-07Trivial changes from the lazy-trees branchEelco Dolstra
2022-12-04getMaxCPU: fix cgroup pathJörg Thalheim
Given this typo I am not sure if it has been tested.
2022-12-02getMaxCPU(): Lower verbosity level for ignored exceptionsEelco Dolstra
Fixes #7268.
2022-12-02Clean up cgroup handling in getMaxCPU()Eelco Dolstra
Also, don't assume in LocalDerivationGoal that cgroups are mounted on /sys/fs/cgroup.
2022-12-02Move cgroup.{cc,hh} to libutilEelco Dolstra
2022-11-29Merge pull request #3600 from NixOS/auto-uid-allocationEelco Dolstra
Automatic UID allocation
2022-11-21Merge remote-tracking branch 'origin/master' into auto-uid-allocationEelco Dolstra
2022-11-18Separate cgroup support from auto-uid-allocationEelco Dolstra
The new experimental feature 'cgroups' enables the use of cgroups for all builds. This allows better containment and enables setting resource limits and getting some build stats.
2022-11-18createTempDir(): Use std::atomicEelco Dolstra
2022-11-16Replace src/libutil/json.cc with nlohmann json generationYorick van Pelt
2022-11-10Remove the SystemdCgroup featureEelco Dolstra
2022-11-04Remove stray tabEelco Dolstra
2022-11-03Merge remote-tracking branch 'origin/master' into auto-uid-allocationEelco Dolstra
2022-11-01tarfile: set directory mode to at least 0500, don't extract fflagsYorick van Pelt
We don't need SGID, or any ACL's. We also want to keep every dir +rx.
2022-10-25Rework error throwing, and test itGuillaume Maudoux
2022-10-22Fix C++20 warningsGraham Bennett
2022-10-17Initial frames supportGuillaume Maudoux
2022-10-16Merge remote-tracking branch 'origin/master' into coerce-stringGuillaume Maudoux