aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-13libexpr/primops: reviewMaximilian Bosch
2021-04-13primops/libexpr: use new attr-call extractor everywhere; use function's pos ↵Maximilian Bosch
if attr-set pos == noPos
2021-04-13libexpr/primops: Move attr name extraction into its own functionMaximilian Bosch
This now takes care of providing positioning for both the faulting value and the faulting function call in case of an error.
2021-04-13libexpr: misc improvements for proper error positionMaximilian Bosch
When working on some more complex Nix code, there are sometimes rather unhelpful or misleading error messages, especially if coerce-errors are thrown. This patch is a first steps towards improving that. I'm happy to file more changes after that, but I'd like to gather some feedback first. To summarize, this patch does the following things: * Attrsets (a.k.a. `Bindings` in `libexpr`) now have a `Pos`. This is helpful e.g. to identify which attribute-set in `listToAttrs` is invalid. * The `Value`-struct has a new method named `determinePos` which tries to guess the position of a value and falls back to a default if that's not possible. This can be used to provide better messages if a coercion fails. * The new `determinePos`-API is used by `builtins.concatMap` now. With that change, Nix shows the exact position in the error where a wrong value was returned by the lambda. To make sure it's still obvious that `concatMap` is the problem, another stack-frame was added. * The changes described above can be added to every other `primop`, but first I'd like to get some feedback about the overall approach.
2021-04-13primops/derivation: use position of currently evaluated attributeMaximilian Bosch
* The position of the `name`-attribute appears in the trace. * If e.g. `meta` has no `outPath`-attribute, a `cannot coerce set to string` error will be thrown where `pos` points to `name =` which is highly misleading.
2021-04-13Merge pull request #4 from domenkozar/libcompress-testsYorick
add tests for zstd compression
2021-04-13Fix registerDrvOutput with the daemonregnat
Resolve a protocol issue that caused the daemon to endlessly wait for some information that the client doesn't ever send
2021-04-12EvalSettings::getDefaultNixPath: respect {restrict,pure}EvalGraham Christensen
Otherwise Nix may look to invalid locations for channels.
2021-04-12Merge pull request #4706 from ↵Domen Kožar
NixOS/dependabot/github_actions/cachix/cachix-action-v10 Bump cachix/cachix-action from v9 to v10
2021-04-12Bump cachix/cachix-action from v9 to v10dependabot[bot]
Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action) from v9 to v10. - [Release notes](https://github.com/cachix/cachix-action/releases) - [Commits](https://github.com/cachix/cachix-action/compare/v9...73e75d1a0cd4330597a571e8f9dedb41faa2fc4e) Signed-off-by: dependabot[bot] <support@github.com>
2021-04-09add tests for zstd compressionDomen Kožar
2021-04-09Revert "libfetchers/tarball: Lock on effectiveUrl"Eelco Dolstra
This reverts commit fc6bfb261d50102016ed812ecf9949d41fe539f7. Fixes #4672.
2021-04-07Restore stack size in child processesEelco Dolstra
Fixes #4673.
2021-04-07restoreSignals() + restoreAffinity() -> restoreProcessContext()Eelco Dolstra
2021-04-07PathSubstitutionGoal: Clean up pipeEelco Dolstra
If there were many top-level goals (which are not destroyed until the very end), commands like $ nix copy --to 'ssh://localhost?remote-store=/tmp/nix' \ /run/current-system --no-check-sigs --substitute-on-destination could fail with "Too many open files". So now we do some explicit cleanup from amDone(). It would be cleaner to separate goals from their temporary internal state, but that would be a bigger refactor.
2021-04-05Revert "[prerequisites]: add JSON lib dependency"Björn Gohla
This reverts commit 5926200db09ca4d0c5769edf24a3cf2e9f472d23.
2021-04-05Revert "Use upstream nlohmann_json"Björn Gohla
This reverts commit 4145cd2da002e1bd8affa0392c80118eabe58e3c.
2021-04-05Merge pull request #4594 from obsidiansystems/lots-of-buildableEelco Dolstra
Use `DerivedPath` for `buildPaths` and `ensurePath`
2021-04-05Document the derived path types.John Ericson
2021-04-05buildable.{cc,hh} -> derived-path.{cc,hh}John Ericson
2021-04-05Make `DerivedPathWithHints` a newtypeJohn Ericson
This allows us to namespace its constructors under it.
2021-04-05Rename BuildableJohn Ericson
2021-04-05"newtype" BuildableReqJohn Ericson
This makes for better types errors and allows us to give it methods.
2021-04-05No templates for `Buildable` and `BuildableReq`John Ericson
2021-04-05Use `BuildableReq` for `buildPaths` and `ensurePath`John Ericson
This avoids an ambiguity where the `StorePathWithOutputs { drvPath, {} }` could mean "build `brvPath`" or "substitute `drvPath`" depending on context. It also brings the internals closer in line to the new CLI, by generalizing the `Buildable` type is used there and makes that distinction already. In doing so, relegate `StorePathWithOutputs` to being a type just for backwards compatibility (CLI and RPC).
2021-04-05Move `StorePathWithOutput` utilities out of store classJohn Ericson
These are by no means part of the notion of a store, but rather are things that happen to use stores. (Or put another way, there's no way we'd make them virtual methods any time soon.) It's better to move them out of that too-big class then. Also, this helps us remove StorePathWithOutputs from the Store interface altogether next commit.
2021-04-05Move `StorePathWithOutputs` into its own header/fileJohn Ericson
In the following commits it will become less prevalent.
2021-04-05Pull out Buildable into its own file/header in libnixstoreJohn Ericson
2021-04-04Merge pull request #4685 from NixOS/bump-actionsEelco Dolstra
bump actions
2021-04-03bump actionsDomen Kožar
2021-04-02Merge pull request #4684 from cgohla/patch-1Eelco Dolstra
[prerequisites]: add JSON lib dependency
2021-04-01[prerequisites]: add JSON lib dependencyBjörn Gohla
2021-03-31flake.nix: Make the sandbox tests work againRobert Hensing
2021-03-31tests/*: show when tests are skippedRobert Hensing
2021-03-31flake.nix: Build nix with strictDeps = trueRobert Hensing
2021-03-31canonPath in one passMykola Orliuk
2021-03-30Merge pull request #4676 from bjornfor/fix-fetchgit-ref-headEelco Dolstra
fetchGit: don't prefix "refs/heads/" on ref = "HEAD"
2021-03-30tests: check that builtins.fetchGit { ..., ref = "HEAD"; } worksBjørn Forsman
2021-03-30fetchGit: don't prefix "refs/heads/" on ref = "HEAD"Bjørn Forsman
This fixes builtins.fetchGit { url = ...; ref = "HEAD"; }, that works in stable nix (v2.3.10), but is broken in nix master: $ ./result/bin/nix repl Welcome to Nix version 2.4pre19700101_dd77f71. Type :? for help. nix-repl> builtins.fetchGit { url = "https://github.com/NixOS/nix"; ref = "HEAD"; } fetching Git repository 'https://github.com/NixOS/nix'fatal: couldn't find remote ref refs/heads/HEAD error: program 'git' failed with exit code 128 The documentation for builtins.fetchGit says ref = "HEAD" is the default, so it should also be supported to explicitly pass it. I came across this issue because poetry2nix can use ref = "HEAD" in some situations. Fixes #4674.
2021-03-29Merge pull request #4239 from tweag/test-against-old-daemonEelco Dolstra
Add a CI check to ensure compatibility with an old daemon
2021-03-29nixpkgs/master compatibilityEelco Dolstra
2021-03-26LocalBinaryCacheStore::upsertFile(): Fix raceEelco Dolstra
When multiple threads try to upsert the same file, this could fail. Fixes #4667.
2021-03-26Fix some typosEelco Dolstra
Fixes #4671.
2021-03-25Merge pull request #4532 from abathur/macos_nixbld_idsDomen Kožar
fix nixbld user name/uid for macOS/darwin
2021-03-24Merge pull request #4650 from samueldr/fix/registry-config-dirEelco Dolstra
Use the appropriate config dir for the registry
2021-03-24Merge pull request #4663 from Stig124/stig124-1Eelco Dolstra
Added Debian-based OS's profiles
2021-03-23Added Debian-based OS's profilesNicolas Stig124 FORMICHELLA
2021-03-23Merge pull request #4603 from DavHau/davhau-improve-nix-conf-help-buildersEelco Dolstra
improve man page for nix.conf (builders)
2021-03-23Merge pull request #4646 from Ma27/support-scoped-v6Eelco Dolstra
Fix Nix to properly work with stores using a scoped IPv6 address
2021-03-23Merge pull request #4657 from ↵Eelco Dolstra
obsidiansystems/build-result-marshalling-cleanup-lighter Fix typos in the last PR #4656