aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
AgeCommit message (Collapse)Author
2020-06-03Merge remote-tracking branch 'obsidian/no-hash-type-unknown' into ↵John Ericson
validPathInfo-ca-proper-datatype
2020-06-02Remove `HashType::Unknown`John Ericson
Instead, `Hash` uses `std::optional<HashType>`. In the future, we may also make `Hash` itself require a known hash type, encoraging people to use `std::optional<Hash>` instead.
2020-06-01Merge branch 'derivation-header-include-order' of github.com:Ericson2314/nix ↵Carlo Nucera
into validPathInfo-ca-proper-datatype
2020-06-01Merge branch 'no-stringly-typed-derivation-output' of ↵Carlo Nucera
github.com:Ericson2314/nix into validPathInfo-ca-proper-datatype
2020-05-28Fixing the result of mergeCarlo Nucera
2020-05-28Merge branch 'master' of github.com:NixOS/nix into enum-classCarlo Nucera
2020-05-28Merge remote-tracking branch 'me/more-rust-ffi' into ↵John Ericson
no-stringly-typed-derivation-output
2020-05-27Rename some variables named “recursive” to “method”Matthew Bauer
This is much less confusing since recursive is no longer a boolean.
2020-05-26Merge remote-tracking branch 'john-ericson/enum-FileIngestionMethod' into ↵Carlo Nucera
no-stringly-typed-derivation-output
2020-05-26Merge remote-tracking branch 'origin/master' into enum-FileIngestionMethodCarlo Nucera
2020-05-04Flag: Use designated initializersEelco Dolstra
2020-04-29Fix displaying error-position in `builtins.fetch{Tree,Tarball}`Maximilian Bosch
Without dereferencing this pointer, you'd get an error like this: ``` error: unsupported argument 'abc' to 'fetchTarball', at 0x13627e8 ```
2020-04-18Merge pull request #3502 from NixOS/more-posDomen Kožar
pass Pos to forceValue to improve infinite recursion error
2020-04-16Use RootValueEelco Dolstra
2020-04-16JSONSax: Use a RootValueEelco Dolstra
More #3377.
2020-04-16ValueMap, VectorVector: Use traceable_allocatorEelco Dolstra
We want to *trace* the 'Value *' arrays, not garbage-collect them! Otherwise the vectors/maps can end up pointing to nowhere. Fixes #3377. Closes #3384.
2020-04-16Add function to allocate a Value in traceable memoryEelco Dolstra
2020-04-16fetchMercurial: Use inputFromAttrs()Eelco Dolstra
2020-04-16pass Pos to forceValue to improve infinite recursion errorDomen Kožar
2020-04-11Merge pull request #3447 from DavHau/improve-tofile-error-msgDomen Kožar
improve toFile error message when containing potential drv path
2020-04-11improve toFile error message when containing potential drv pathDavHau
2020-04-09Attach pos to if expression errorsDomen Kožar
2020-04-08after flake rebaseNikola Knezevic
2020-04-08datatransfer.{cc,hh} -> filetransfer.{cc,hh}Nikola Knezevic
2020-04-08DownloadError -> DataTransferErrorNikola Knezevic
2020-04-08Rename src/lib/download.* to src/lib/datatransfer.*Nikola Knezevic
2020-04-08Merge pull request #3468 from Infinisil/functionArgsPositionsEelco Dolstra
Make function arguments retain position info
2020-04-07Merge branch 'fetchgit-recursive' of https://github.com/blitz/nixEelco Dolstra
2020-04-07Backport libfetchers from the flakes branchEelco Dolstra
This provides a pluggable mechanism for defining new fetchers. It adds a builtin function 'fetchTree' that generalizes existing fetchers like 'fetchGit', 'fetchMercurial' and 'fetchTarball'. 'fetchTree' takes a set of attributes, e.g. fetchTree { type = "git"; url = "https://example.org/repo.git"; ref = "some-branch"; rev = "abcdef..."; } The existing fetchers are just wrappers around this. Note that the input attributes to fetchTree are the same as flake input specifications and flake lock file entries. All fetchers share a common cache stored in ~/.cache/nix/fetcher-cache-v1.sqlite. This replaces the ad hoc caching mechanisms in fetchGit and download.cc (e.g. ~/.cache/nix/{tarballs,git-revs*}). This also adds support for Git worktrees (c169ea59049f861aaba429f48b828d0820b74d1d).
2020-04-02libexpr: remove unused attrErrorAndreas Rammhold
The attrError variable is no longer used but still allocated on every call to the findAlongAttrPath function.
2020-04-02Make function arguments retain position infoSilvan Mosberger
This allows querying the location of function arguments. E.g. builtins.unsafeGetAttrPos "x" (builtins.functionArgs ({ x }: null)) => { column = 57; file = "/home/infinisil/src/nix/inst/test.nix"; line = 1; }
2020-03-30s/outputHashRecursive/ingestionMethod/cJohn Ericson
2020-03-30Never cast `FileIngestionMethod` to or from booleanJohn Ericson
2020-03-30Merge remote-tracking branch 'upstream/master' into enum-FileIngestionMethodJohn Ericson
2020-03-30Use `auto` with some `FileIngestionMethod` local variablesJohn Ericson
2020-03-30Store parsed hashes in `DerivationOutput`John Ericson
It's best to detect invalid data as soon as possible, with data types that make storing it impossible.
2020-03-30Remove global -I flagsEelco Dolstra
(cherry picked from commit 2c692a3b144523bca68dd6de618124ba6c9bb332)
2020-03-30fetchGit: don't use std::filesystem to filter git reposJulian Stecklina
Using std::filesystem means also having to link with -lstdc++fs on some platforms and it's hard to discover for what platforms this is needed. As all the functionality is already implemented as utilities, use those instead.
2020-03-29fetchGit: fix submodule corner case by fetching all refs from cacheDirBjørn Forsman
Due to fetchGit not checking if rev is an ancestor of ref (there is even a FIXME comment about it in the code), the cache repo might not have the ref even though it has the rev. This doesn't matter when submodule = false, but the submodule = true code blows up because it tries to fetch the (missing) ref from the cache repo. Fix this in the simplest way possible: fetch all refs from the local cache repo when submodules = true. TODO: Add tests.
2020-03-29fetchGit: fix submodules = true for dirty treesBjørn Forsman
2020-03-29fetchGit: checkout rev instead of latest refBjørn Forsman
Major bugfix for the submodules = true code path. TODO: Add tests.
2020-03-29fetchGit: add submodules attribute to the .link fileBjørn Forsman
The .link file is used as a lock, so I think we should put the "submodule" attribute in there since turning on submodules creates a new .link file path.
2020-03-29fetchGit: fix submodule output attributeBjørn Forsman
Before this change it would be false for all evaluations but the first. Now it follows the input argument (as it should).
2020-03-29fetchGit: fix "fatal: couldn't find remote ref refs/heads/master" issue with ↵Bjørn Forsman
submodules
2020-03-29Link to stdc++fsJulian Stecklina
Some platforms seem to still require linking with stdc++fs to enable STL std::filesystem support.
2020-03-29Rename fetchGit fetchSubmodules to just submodulesJulian Stecklina
2020-03-29Add git submodule fixes from @bjornforJulian Stecklina
This fixes fetching repositories with no submodules and also cleans up .git files in checkouts.
2020-03-29Add fetchSubmodules to builtins.fetchGitJulian Stecklina
There are some downsides to this features: - Submodules are not cached (unlike the root repo), - Full checkouts are created in a temporary directory.
2020-03-29Replace some `bool recursive` with a new `FileIngestionMethod` enumJohn Ericson
2020-03-29Use `enum struct` and drop prefixesJohn Ericson
This does a few enums; the rest will be gotten in subsequent commits.