aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
AgeCommit message (Collapse)Author
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-28Warn about --override-input / --update-input flags that don't match an inputEelco Dolstra
2020-03-28nix flake info: Show flake subdirectoryEelco Dolstra
2020-03-27Improve lock file generationEelco Dolstra
This is now done in a single pass. Also fixes some issues when updating flakes with circular dependencies. Finally, when using '--recreate-lock-file --commit-lock-file', the commit message now correctly shows the differences.
2020-03-27Fix diffLockFiles()Eelco Dolstra
2020-03-24Misc changes from the flakes branchEelco Dolstra
2020-03-24Fix coverage buildEelco Dolstra
https://hydra.nixos.org/build/110757285 (cherry picked from commit b430a81a1fbf6c792ba49e3aefe46256263430e5)
2020-03-24nix edit: Support non-derivation attributesEelco Dolstra
E.g. $ nix edit .#nixosConfigurations.bla now works. (cherry picked from commit d2032edb2f86e955a8a7724a27c0c3225f386500)
2020-03-24findAlongAttrPath(): Return positionEelco Dolstra
(cherry picked from commit 0b013a54dc570395bed887369f8dd622b8ce337b)
2020-03-24findAlongAttrPath(): Throw AttrPathNotFoundEelco Dolstra
(cherry picked from commit 6b0ca8e803710342af70e257935724c5ad84ca04)
2020-03-24EvalState::allocAttr(): Add convenience methodEelco Dolstra
(cherry picked from commit c02da997570ac0d9b595d787bea8cb5a4e3cc1f5)
2020-03-20Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-03-18Get rid of downloadCached()Eelco Dolstra
Everything uses the generic caching system now.
2020-03-17Require shallow clones to be requested explicitlyEelco Dolstra
If you do a fetchTree on a Git repository, whether the result contains a revCount attribute should not depend on whether that repository happens to be a shallow clone or not. That would complicate caching a lot and would be semantically messy. So applying fetchTree/fetchGit to a shallow repository is now an error unless you pass the attribute 'shallow = true'. If 'shallow = true', we don't return revCount, even if the repository is not actually shallow. Note that Nix itself is not doing shallow clones at the moment. But it could do so as an optimisation if the user specifies 'shallow = true'. Issue #2988.
2020-03-17Unified fetcher caching systemEelco Dolstra
2020-03-16Add a test for shallow Git clonesEelco Dolstra
Also, don't return a revCount anymore for shallow or dirty Git trees, since it's incorrect. Closes #2988.
2020-03-13Add missing `#include <regex>`John Ericson
2020-03-12Change the lock file to a graphEelco Dolstra
This enables support for cycles between flakes.
2020-03-11Move call-flake.nix into libexprEelco Dolstra
2020-03-11Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-03-11Move some corepkgs into the nix binaryEelco Dolstra
2020-03-11parseExprFromString(): Use std::string_viewEelco Dolstra
2020-03-10Fix flake subdirectory handlingEelco Dolstra
2020-03-09Move calling flakes into a Nix helper function (call-flake.nix)Eelco Dolstra
2020-03-09Add 'flake' attribute to lock files to denote non-flakesEelco Dolstra
2020-03-04Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-03-04builtins.cache: Cache regular expressionsEelco Dolstra
The evaluator was spending about 1% of its time compiling a small number of regexes over and over again.
2020-02-20Restore subdir -> dirEelco Dolstra
Got this mixed up somewhere.
2020-02-20Restore subdir support in registriesEelco Dolstra
Hacky...
2020-02-20fetchTree: Use a feature flagEelco Dolstra
2020-02-14Fix buildEelco Dolstra
2020-02-14Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-02-13Bindings::get(): std::optional<Attr *> -> Attr *Eelco Dolstra
Returning a nullable type in an optional is silly.
2020-02-11Add fetchTree builtin functionEelco Dolstra
This allows all supported fetchers to be used, e.g. builtins.fetchTree { type = "github"; owner = "NixOS"; repo = "nix"; rev = "d4df99a3349cf2228a8ee78dea320afef86eb3ba"; }
2020-02-07nix edit: Support non-derivation attributesEelco Dolstra
E.g. $ nix edit .#nixosConfigurations.bla now works.
2020-02-07findAlongAttrPath(): Return positionEelco Dolstra
2020-02-06Registry: Use attr notation instead of URLsEelco Dolstra
2020-02-05Warn when we commit a new revisionEelco Dolstra
2020-02-05Improve commit subject lineEelco Dolstra
2020-02-05Add option --commit-lock-fileEelco Dolstra