aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-12Merge branch 'debugThrow' into debug-exploratory-PRBen Burdette
2022-05-12template-ize debugThrowBen Burdette
2022-05-09Merge branch 'master' into debug-exploratory-PRBen Burdette
2022-05-09Merge pull request #6505 from jtojnar/patch-3Théophane Hufschmitt
libexpr: Fix manual link in error message
2022-05-08libexpr: Fix manual link in error messageJan Tojnar
It was changed to the old manual in https://github.com/NixOS/nix/commit/8895fa70a4b05ddebbb5a23ea96464d5e01345fb
2022-05-06Add unit tests for libexpr (#5377)Andreas Rammhold
* libexpr: fix builtins.split example The example was previously indicating that multiple whitespaces would be collapsed into a single captured whitespace. That isn't true and was likely a mistake when being documented initially. * Fix segfault on unitilized list when printing value Since lists are just chunks of memory the individual elements in the list might be unitilized when a programming error happens within Nix. In this case the values are null-initialized (at least with Boehm GC) and we can avoid a nullptr deref when printing them. I ran into this issue while ensuring that new expression tests would show the actual value on an assertion failure. This is unlikely to cause any runtime performance regressions as printing values is not really in the hot path (unless the repl is the primary use case). * Add operator<< for ValueTypes * Add libexpr tests This introduces tests for libexpr that evalulate various trivial Nix language expressions and primop invocations that should be good smoke tests wheter or not the implementation is behaving as expected.
2022-05-06debugError()Ben Burdette
2022-05-06trying debugThrowBen Burdette
2022-05-06renderMarkdownToTerminal(): Avoid line overflowEelco Dolstra
Lowdown doesn't respect '.cols' exactly (maybe because of the whitespace in front of each line), so adjust .cols a bit.
2022-05-06Merge pull request #6483 from NixOS/fix-sourcehut-ref-parsingEelco Dolstra
Fix the parsing of the sourcehut refs file
2022-05-05fix repl bugBen Burdette
2022-05-05traceable_allocatorBen Burdette
2022-05-05rename valmapBen Burdette
2022-05-05don't print the 'break' argumentBen Burdette
2022-05-05rename debug commands to be more gdb-like; hide them except in debug modeBen Burdette
2022-05-05Merge branch 'NixOS:master' into debug-exploratory-PRBen Burdette
2022-05-05builtins.break: Return argument when debugging is not enabledEelco Dolstra
2022-05-05Style fixesEelco Dolstra
In particular, use std::make_shared and enumerate(). Also renamed some fields to fit naming conventions.
2022-05-05Merge pull request #6489 from alexshpilkin/fix-6488Eelco Dolstra
nix: Add forgotten null check in AttrCursor::getListOfStrings()
2022-05-05Make sure that `nix build` works in `--impure` modeThéophane Hufschmitt
Regression test for <https://github.com/NixOS/nix/issues/6488>
2022-05-05Merge pull request #6492 from thkoch2001/patch-2Eelco Dolstra
Change json example to be original
2022-05-05Change json example to be originalthkoch2001
Closes: #3391
2022-05-04Add forgotten null checkAlexander Shpilkin
2022-05-04Fix the parsing of the sourcehut refs fileThéophane Hufschmitt
Since a26be9f3b89be2ee90c6358250b9889b37f95cf8, the same parser is used to parse the result of sourcehut’s `HEAD` endpoint (coming from [git dumb protocol]) and the output of `git ls-remote`. However, they are very slightly different (the former doesn’t specify the current reference since it’s implied to be `HEAD`). Unify both, and make the parser a bit more robust and understandable (by making it more typed and adding tests for it) [git dumb protocol]: https://git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols#_the_dumb_protocol
2022-05-04Merge remote-tracking branch 'origin/master' into debug-exploratory-PREelco Dolstra
2022-05-04Merge pull request #6482 from edolstra/json-utilsEelco Dolstra
Move json stuff out of util.cc
2022-05-04Fix compiler warningEelco Dolstra
2022-05-04Move json stuff out of util.ccEelco Dolstra
2022-05-04Get rid of most `.at` calls (#6393)Alain Zscheile
Use one of `get` or `getOr` instead which will either return a null-pointer (with a nicer error message) or a default value when the key is missing.
2022-05-03Merge pull request #6449 from edolstra/outputs-specEelco Dolstra
Allow selecting derivation outputs
2022-05-03nix profile: Support overriding outputsEelco Dolstra
2022-05-03Allow selecting derivation outputs using 'installable!outputs'Eelco Dolstra
E.g. 'nixpkgs#glibc^dev,static' or 'nixpkgs#glibc^*'.
2022-05-03Merge pull request #6426 from edolstra/respect-outputs-to-installEelco Dolstra
nix: Respect meta.outputsToInstall, and use all outputs by default
2022-05-03Merge pull request #6465 from layus/fix-test-crashesThéophane Hufschmitt
tests: Distinguish crashes from expected failures
2022-05-02tests/lang: Distinguish crashes from expected failuresGuillaume Maudoux
2022-05-02Revert "tests: Distinguish crashes from expected failures"Guillaume Maudoux
This reverts commit 143b73f52dabb35cd56551c24caef95466bce488.
2022-05-02Style fixesEelco Dolstra
2022-05-02Merge pull request #6470 from Ma27/git-followupEelco Dolstra
libfetchers/git: fix every occasion of a permission error
2022-05-02Merge pull request #4638 from orbekk/read_headEelco Dolstra
Resolve reference for remote git repositories (makes fetchGit work with non-'master' branch)
2022-05-02tests: Don't create tests/resultEelco Dolstra
https://hydra.nixos.org/log/lns780srkka4dv7r69mn4zfy6fdij4yr-nix-2.9.0pre20220428_4bb111c.drv
2022-04-30libfetchers/git: fix every occasion of a permission errorMaximilian Bosch
I'm afraid I missed a few problematic `git(1)`-calls while implementing PR #6440, sorry for that! Upon investigating what went wrong, I realized that I only tested against the "cached"-case by accident because my git-checkout with my system's flake was apparently cached during my debugging. I managed to trigger the original issue again by running: $ git commit --allow-empty -m "tmp" $ sudo nixos-rebuild switch --flake .# -L --builders '' Since `repoDir` points to the checkout that's potentially owned by another user, I decided to add `--git-dir` to each call affecting `repoDir`. Since the `tmpDir` for the temporary submodule-checkout is created by Nix itself, it doesn't seem to be an issue. Sorry for that, it should be fine now.
2022-04-29Extract git reference parsing to a shared libraryKjetil Orbekk
These utility functions can be shared between the git and github fetchers.
2022-04-29Update `nix flake` documentation of `ref` handlingKjetil Orbekk
Update the documentation about how `ref` is resolved if it is not specified. Add a note about special handling of local workdirs with `git+file`.
2022-04-29Store cached head in cached git repoKjetil Orbekk
The previous head caching implementation stored two paths in the local cache; one for the cached git repo and another textfile containing the resolved HEAD ref. This commit instead stores the resolved HEAD by setting the HEAD ref in the local cache appropriately.
2022-04-29Refactor fetching of dirty workdirKjetil Orbekk
Extract the handling of a local dirty workdir to a helper function.
2022-04-29Test fetchGit with non-'master' remote repoKjetil Orbekk
2022-04-29Resolve reference for remote repositoryKjetil Orbekk
Resolves the HEAD reference from the remote repository instead of assuming "master".
2022-04-29remove 'libnix'Ben Burdette
2022-04-29spacingBen Burdette
2022-04-29line endingsBen Burdette