1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 21:01:16 +02:00
Commit graph

12190 commits

Author SHA1 Message Date
Jörg Thalheim
dd4838974e document shallow clone options in git fetchers 2024-11-19 13:24:11 +01:00
Valentin Gagarin
3b76d01f3b
Merge pull request #11907 from Mic92/pull-request
docs/flake: document how to build a pull request
2024-11-19 12:08:33 +01:00
Jörg Thalheim
e224a35a77 docs/flake: document how to build a pull request
It's not so common knowledge that forges also expose pull requests as
git refs. But it's actually a cool way of quickly testing someones
contribution, so I found it worth specifically mentioning it.
2024-11-19 11:25:33 +01:00
Robert Hensing
6b0aceedc5
Merge pull request #11902 from roberth/fix-issue-11892
Fix issue #11892
2024-11-18 22:20:01 +01:00
Robert Hensing
c4b95dbdd1 Fix issue 11892
It seems that I copied the expression for baseDir thoughtlessly and
did not come back to it.

- `baseDir` was only used in the `fromArgs` branch.
- `fromArgs` is true when `packages` is true.
2024-11-18 21:04:04 +01:00
Robert Hensing
61d075840f
Merge pull request #11866 from DeterminateSystems/callFunction-span
callFunction: Use std::span
2024-11-18 18:37:12 +01:00
Leandro Reina
b48dacd50c Add docs 2024-11-18 13:38:43 +01:00
Valentin Gagarin
4387c5ae80
Merge pull request #11894 from myclevorname/nixfmt
doc/nix fmt: Mention nixfmt-rfc-style instead of nixfmt(-classic)
2024-11-18 09:06:08 +01:00
Brian Camacho
f67b63fa3a remove debug prints 2024-11-18 01:21:14 -05:00
Brian Camacho
b548e5c4c5 typo 2024-11-18 01:15:02 -05:00
John Ericson
68e15beedd
Merge pull request #11844 from roberth/papercut-nix-log
Make nix log command easy to copy
2024-11-17 19:06:16 -05:00
myclevorname
3f6855c31b
doc/nix fmt: Mention nixfmt-rfc-style instead of nixfmt(-classic) 2024-11-17 14:12:27 -05:00
Brian Camacho
6d0043902a Merge remote-tracking branch 'origin/master' into lfs 2024-11-17 12:16:15 -05:00
Brian Camacho
7bbc7305e8 typo 2024-11-17 02:48:14 -05:00
Brian Camacho
976941bd2f typo 2024-11-17 02:42:07 -05:00
Brian Camacho
3252ca0fdc unit tests 2024-11-17 02:40:15 -05:00
Brian Camacho
24453b79eb pass path.rel instead of path.abs to gitattr matcher 2024-11-17 02:39:47 -05:00
Brian Camacho
0878e8ff44 use libgit2 pathspec matching instead of reimpl 2024-11-17 02:37:55 -05:00
Eelco Dolstra
3e4a83f53b Use range-based for 2024-11-14 16:12:14 +01:00
Eelco Dolstra
33a0fa882f nix path-info: Don't write to std::cout directly
This interferes with the progress bar, resulting in output like

  evaluating derivation 'git+file:///home/eelco/Dev/nix-master#packages.x86_64-linux.default'/nix/store/zz8v96j5md952x0mxfix12xqnvq5qv5x-nix-2.26.0pre20241114_a95f6ea.drv
2024-11-14 15:40:33 +01:00
Sergei Zimmerman
b9f8c4af40 fix(libmain/common-args): do not exceed maximum allowed verbosity
This patch gets rid of UB when verbosity exceeds the maximum logging value of `lvlVomit = 7` and
reaches invalid values (e.g. 8). This is actually triggered in functional tests.
There are too many occurrences to list, but here's one from the UBSAN log:

../src/libstore/gc.cc:610:5: runtime error: load of value 8, which is not a valid value for type 'Verbosity'
2024-11-14 02:07:03 +03:00
John Ericson
7ebeceaf3d
Merge pull request #11860 from DeterminateSystems/fix-doxygen-warnings
Fix most Doxygen warnings
2024-11-13 16:09:37 -05:00
Eelco Dolstra
2d2b9cd45d
Merge pull request #11876 from jackwilsdon/osc8
Filter OSC 8 correctly
2024-11-13 18:27:27 +01:00
Robert Hensing
f534a7a524 Remove warning that interpretation of .drv has changed
This was first tagged as 2.15.0, 1½ years ago; plenty of time for
everyone to catch up.

By now, the warning is causing more confusion than that it is helpful,
because passing a `.drv` or `drvPath` has legitimate use cases.
2024-11-13 16:32:21 +01:00
Jack Wilsdon
1301f8434d Filter OSC 8 correctly
This allows Nix to use lowdown 1.2.0 which outputs OSC-8 links.
2024-11-13 00:49:46 +00:00
Eelco Dolstra
37f4c71d1c Don't change nix::fs for now 2024-11-12 21:10:01 +01:00
Eelco Dolstra
a2e4a4c238 callFunction: Use std::span
This is a bit safer than having a separate nrArgs argument.
2024-11-12 19:26:39 +01:00
Eelco Dolstra
02f0294be0 Fix most DoxyGen warnings
Helps with #11841.
2024-11-12 15:34:24 +01:00
Eelco Dolstra
2e2198fd91
Merge pull request #11855 from nix-windows/fix-windows-env-var-arg-order
Fix argument order in the Windows implementation of `getEnvOs`
2024-11-12 10:47:12 +01:00
Brian Camacho
9a6388dce6 logs around getFingerprint 2024-11-12 02:17:06 -05:00
John Ericson
355f08a728 Fix argument order in the Windows implementation of getEnvOs
See the build failure in https://github.com/msys2/MINGW-packages/pull/22499
2024-11-12 00:52:17 -05:00
Eelco Dolstra
f29e7867a9 Revert "Merge pull request #11826 from DeterminateSystems/revert-11804"
This reverts commit aeffdeffc8, reversing
changes made to 723fdeb4f1.
2024-11-11 15:21:34 +01:00
Eelco Dolstra
67a42e6240 Merge remote-tracking branch 'origin/master' into flake-substitution 2024-11-11 13:57:24 +01:00
Robert Hensing
545956d56a
Merge pull request #11849 from NixOS/autocall-const
autoCallFunction: accept const Bindings &
2024-11-10 21:31:11 +01:00
Robert Hensing
a3613f2a3c autoCallFunction: accept const Bindings &
It does not need to mutate the attrs.
`const` is shallow.
Avoids a const_cast in the hercules-ci-cnix-expr bindings.
2024-11-10 20:52:05 +01:00
Brian Camacho
b69fb151c4 better url handling; unit tests 2024-11-10 03:41:05 -05:00
Jörg Thalheim
aa9c0bc1ee
Merge pull request #11843 from xokdvium/dev/move-fixes
fix(treewide): clean up move semantics
2024-11-09 21:57:27 +01:00
Jörg Thalheim
cdcf9bd2fa
Merge pull request #11847 from xokdvium/dev/some-vector-reserves
refactor(treewide): reserve vector capacity when final size is known
2024-11-09 21:49:36 +01:00
Sergei Zimmerman
0fe3b54ee1 refactor(treewide): reserve vector capacity when final size is known
In these trivial cases the final vector size (or lower bound on the size) is known,
so we can avoid some vector reallocations. This is not very important, but is just
good practice and general hygiene.
2024-11-09 22:40:49 +03:00
Sergei Zimmerman
96eeb6f4ff refactor(treewide): make some move ctors noexcept where appropriate
This is good practice to avoid pessimisations.
Left comments for the reasoning why ctors should be noexcept.
There are some tricky cases where we intentionally want throwing move ctors/assignments.
But those cases should really be reviewed, since some of those can be replaced
with more idiomatic copy/move-and-swap.
2024-11-09 12:09:33 +03:00
Robert Hensing
4b44fa0f06 Make nix log command easy to copy on its own line 2024-11-08 20:17:13 +01:00
Robert Hensing
59246349d5 Make nix log command easier to copy 2024-11-08 20:13:07 +01:00
Eelco Dolstra
4dceca51de Don't allow __final in fetchTree
It's now only allowed in fetchFinalTree, which is not exposed to users
but only to call-flake.nix.
2024-11-08 19:27:54 +01:00
Sergei Zimmerman
0347bca15b fix(libstore/path-info): make ValidPathInfo move constructible/assignable 2024-11-08 20:48:00 +03:00
Sergei Zimmerman
149802b9f5 fix(libstore): make BasicDerivation move-constructible/assignable 2024-11-08 20:10:38 +03:00
Sergei Zimmerman
8dd787fbf6 fix(libutil): remove no-op move from const 2024-11-08 20:10:38 +03:00
Sergei Zimmerman
6c3f720e2c fix(treewide): move arguments where needed
Moving from arguments where it should be done.
2024-11-08 20:10:38 +03:00
Sergei Zimmerman
af63d67ba5 fix(libutils): make ref move assignable/constructible 2024-11-08 20:10:38 +03:00
Sergei Zimmerman
17b49134fa fix(treewide): fix incorrect usage of std::move
`auto &&` and `T &&` are forwarding references and can be
either lvalue or rvalue references. Moving from universal references
is incorrect and should not be done.

Moving from integral or floating-point values is pointless and just
worsens debug performance.
2024-11-08 20:10:38 +03:00
Eelco Dolstra
d90b56d527 Remove no longer needed hack 2024-11-08 17:31:35 +01:00