Commit graph

102 commits

Author SHA1 Message Date
Robert Hensing
d4f576b0b2 nix repl: Render docs for attributes 2024-07-15 19:56:40 +02:00
Robert Hensing
7fae378835 Track doc comments and render them in :doc 2024-07-15 19:56:40 +02:00
Robert Hensing
cfe3ee3de8
nix-shell: look up shell.nix when argument is a directory (#11057)
* Refactor: rename runEnv -> isNixShell

* Refactor: rename left -> remainingArgs

* nix-build.cc: Refactor: extract baseDir variable

* nix-build.cc: Refactor: extract sourcePath, resolvedPath variables

* nix-shell: Look for shell.nix when directory is specified

* Add legacy setting: nix-shell-always-looks-for-shell-nix

* rl-next: Add note about shell.nix lookups

* tests/functional/shell.nix: Implement runHook for dummy stdenv
2024-07-08 14:36:36 +02:00
Winter
149d8eb8aa Stop vendoring toml11
We don't apply any patches to it, and vendoring it locks users into
bugs (it hasn't been updated since its introduction in late 2021).

Closes https://git.lix.systems/lix-project/lix/issues/164

Change-Id: Ied071c841fc30b0dfb575151afd1e7f66970fdb9
(cherry picked from commit 80405d06264f0de1c16ee2646388ab501df20628)
2024-06-26 22:27:13 -04:00
John Ericson
32e67eba8b Remove invalid release notes YAML field
There is no PR for this, since it was an embargoed fix before
disclosure.
2024-06-26 19:35:57 -04:00
Théophane Hufschmitt
d99c868b04 Add a release note for the build-dir hardening 2024-06-21 17:06:19 +02:00
Eelco Dolstra
754ea9058d release notes: 2.23.0 2024-06-03 18:06:42 +02:00
Eelco Dolstra
da92ad7dd2
Merge pull request #10592 from hercules-ci/builtins-warn
Add `builtins.warn`
2024-06-03 17:16:32 +02:00
Robert Hensing
3a0b0af2ac Fix typo in doc/manual/rl-next/builtins-warn.md
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2024-06-03 16:24:21 +02:00
Robert Hensing
70b1036224 builtins.warn: Use new EvalBaseError + "evaluation warning" 2024-06-03 16:24:21 +02:00
Eelco Dolstra
54a9fbe5d6 Merge remote-tracking branch 'origin/master' into large-path-warning 2024-06-03 16:17:52 +02:00
Eelco Dolstra
ac3e5d22e3
Merge pull request #10028 from DavHau/fetchTree-shallow-default
fetchTree: shallow git fetching by default
2024-06-03 16:02:34 +02:00
Eelco Dolstra
d2bfc7e55a Add release note 2024-06-03 15:55:19 +02:00
John Ericson
84c65135a5 ValidPathInfo JSON format should use null not omit field
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-06-03 08:21:22 -04:00
Robert Hensing
c692f6af13 nix env shell: Move from nix shell, add shorthand alias 2024-05-30 19:41:58 +02:00
Qyriad
18ac6545fc print type and value in "flake attr is not a derivation" errors
This turns errors like:

error: flake output attribute 'hydraJobs' is not a derivation or path

into errors like:

error: expected flake output attribute 'hydraJobs' to be a derivation or
path but found a set: { binaryTarball = «thunk»; build = «thunk»; etc> }

This change affects all InstallableFlake commands.

Source: 20981461d4
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2024-05-29 20:51:32 +02:00
Jörg Thalheim
e2182d07d9 fixup extension of changelog entry 2024-05-29 20:51:32 +02:00
Robert Hensing
67db9e0c64
Merge pull request #10722 from obsidiansystems/ca-obj-docs
Content addressing store objects
2024-05-20 15:58:29 +02:00
John Ericson
1c75af969a Document store object content addressing & improve JSON format
The JSON format no longer uses the legacy ATerm `r:` prefixing nonsese,
but separate fields.

Progress on #9866

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-05-20 09:34:35 -04:00
Robert Hensing
e4be8abe42
Merge pull request #10701 from cole-h/nix-command-warn-unknown-settings
Warn on unknown settings when the first positional is an argument
2024-05-20 15:15:13 +02:00
Maximilian Bosch
19720d733f nix3-build: show all FOD errors with --keep-going
Basically I'd expect the same behavior as with `nix-build`, i.e.
with `--keep-going` the hash-mismatch error of each failing
fixed-output derivation is shown.

The approach is derived from `Store::buildPaths` (`entry-point.cc`):
instead of throwing the first build-result, check if there are any build
errors and if so, display all of them and throw after that.

Unfortunately, the BuildResult struct doesn't have an `ErrorInfo`
(there's a FIXME for that at least), so I have to construct my own here.
This is a rather cheap bugfix and I decided against touching too many
parts of libstore for that (also I don't know if that's in line with the
ongoing refactoring work).

Closes https://git.lix.systems/lix-project/lix/issues/302

Change-Id: I378ab984fa271e6808c6897c45e0f070eb4c6fac
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2024-05-17 18:48:52 +02:00
Cole Helbling
39a269657e libutil/args: warn on unknown settings after parsing all flags 2024-05-15 12:25:03 -07:00
Eelco Dolstra
34c5346e98 release notes: 2.22.0 2024-04-23 10:19:32 +02:00
Jonathan De Troye
a09d0e19c1
flakes: Reword doc/manual/rl-next/remove-repl-flake.md
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2024-03-29 08:57:41 -04:00
detroyejr
50885b81c9 fix: correct remove-repl-flake.md 2024-03-23 06:31:49 -04:00
detroyejr
c625b45357 flakes: add remove-repl-flake.md note 2024-03-22 21:39:48 -04:00
tomberek
25bf671015
Merge pull request #10200 from 9999years/fix-nix-eval-for-derivations
Fix `nix eval nixpkgs#bash` segfault
2024-03-11 13:56:49 -04:00
Rebecca Turner
7f45b1c8d8
Add release note 2024-03-11 10:03:01 -07:00
Eelco Dolstra
b12dc76cfc release notes: 2.21.0 2024-03-11 16:22:29 +01:00
tomberek
a200ee6bf7
Merge pull request #9874 from pennae/error-reports
improve error reports somewhat
2024-03-08 10:51:14 -05:00
Eelco Dolstra
ae2bd460a8
Merge pull request #10166 from bobvanderlinden/profile-regex-all
profile: introduce --regex and --all
2024-03-08 15:59:24 +01:00
Bob van der Linden
4741d3e308
add release note 2024-03-07 21:07:03 +01:00
Eelco Dolstra
da62528487
Merge pull request from GHSA-2ffj-w4mj-pg37
Copy built outputs
2024-03-07 11:56:24 +01:00
pennae
1edd6fada5 report inherit attr errors at the duplicate name
previously we reported the error at the beginning of the binding
block (for plain inherits) or the beginning of the attr list (for
inherit-from), effectively hiding where exactly the error happened.

this also carries over to runtime positions of attributes in sets as
reported by unsafeGetAttrPos. we're not worried about this changing
observable eval behavior because it *is* marked unsafe, and the new
behavior is much more useful.
2024-03-06 23:11:12 +01:00
pennae
4147ecfb1c normalize formal order on ExprLambda::show
we already normalize attr order to lexicographic, doing the same for
formals makes sense. doubly so because the order of formals would
otherwise depend on the context of the expression, which is not quite as
useful as one might expect.
2024-03-06 23:11:12 +01:00
Rebecca Turner
4ee5433919
Add release note 2024-03-04 09:24:56 -08:00
Eelco Dolstra
e6b9432542 Add release note 2024-03-04 12:48:21 +01:00
Théophane Hufschmitt
cd9baa1809 Add release notes 2024-03-01 09:39:50 +01:00
tomberek
ffe67c86a8
Merge pull request #9915 from 9999years/evaluating-attribute-position
Add position information to `while evaluating the attribute` errors in the debugger
2024-02-28 18:11:07 -05:00
DavHau
358c26fd13 fetchTree: shallow git fetching by default
Motivation:
make git fetching more efficient for most repos by default
2024-02-28 13:27:22 +07:00
Robert Hensing
4c7f0ef6ca
Merge pull request #9847 from pennae/inherit-from-dedup
deduplicate inherit-from source expr work
2024-02-26 20:25:58 +01:00
pennae
cefd0302b5 evaluate inherit (from) exprs only once per directive
desugaring inherit-from to syntactic duplication of the source expr also
duplicates side effects of the source expr (such as trace calls) and
expensive computations (such as derivationStrict).
2024-02-26 19:07:08 +01:00
Théophane Hufschmitt
774e7ca584
Merge pull request #9914 from 9999years/debugger-on-trace
Enter debugger on `builtins.trace` with an option
2024-02-21 18:32:56 +01:00
Rebecca Turner
b111fba8cd
Add documentation, rename to debugger-on-trace 2024-02-21 09:07:39 -08:00
Rebecca Turner
6d2b446e2b
Add release notes for "Pretty print values in nix repl" 2024-02-14 08:58:54 -08:00
Rebecca Turner
4440eb54e7
Add release note 2024-02-08 12:07:38 -08:00
Rebecca Turner
0f1269243b
Revert "Add release notes for "Stack traces are more compact""
This reverts commit b2868acbdc.
2024-02-08 10:09:47 -08:00
Rebecca Turner
b2868acbdc
Add release notes for "Stack traces are more compact" 2024-02-08 10:08:48 -08:00
Rebecca Turner
7f8960d0f2
Add release notes for "Stack size is increased on macOS" 2024-02-08 10:08:48 -08:00
Rebecca Turner
837c350bcd
Add release notes for "Cycle detection in nix repl is simpler and more reliable" 2024-02-08 10:08:48 -08:00