forked from NixOS/nix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error messages for invalid derivation names
- Loading branch information
Showing
16 changed files
with
145 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
error: | ||
… while evaluating the attribute 'outPath' | ||
at <nix/derivation-internal.nix>:19:9: | ||
18| value = commonAttrs // { | ||
19| outPath = builtins.getAttr outputName strict; | ||
| ^ | ||
20| drvPath = strict.drvPath; | ||
|
||
… while calling the 'getAttr' builtin | ||
at <nix/derivation-internal.nix>:19:19: | ||
18| value = commonAttrs // { | ||
19| outPath = builtins.getAttr outputName strict; | ||
| ^ | ||
20| drvPath = strict.drvPath; | ||
|
||
… while calling the 'derivationStrict' builtin | ||
at <nix/derivation-internal.nix>:9:12: | ||
8| | ||
9| strict = derivationStrict drvAttrs; | ||
| ^ | ||
10| | ||
|
||
… while evaluating derivation '~jiggle~' | ||
whose name attribute is located at /pwd/lang/eval-fail-derivation-name.nix:2:3 | ||
|
||
error: invalid derivation name: name '~jiggle~' contains illegal character '~'. Please pass a different 'name'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
derivation { | ||
name = "~jiggle~"; | ||
system = "some-system"; | ||
builder = "/dontcare"; | ||
} |
8 changes: 8 additions & 0 deletions
8
tests/functional/lang/eval-fail-fetchurl-baseName-attrs-name.err.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: | ||
… while calling the 'fetchurl' builtin | ||
at /pwd/lang/eval-fail-fetchurl-baseName-attrs-name.nix:1:1: | ||
1| builtins.fetchurl { url = "https://example.com/foo.tar.gz"; name = "~wobble~"; } | ||
| ^ | ||
2| | ||
|
||
error: invalid store path name when fetching URL 'https://example.com/foo.tar.gz': name '~wobble~' contains illegal character '~'. Please change the value for the 'name' attribute passed to 'fetchurl', so that it can create a valid store path. |
1 change: 1 addition & 0 deletions
1
tests/functional/lang/eval-fail-fetchurl-baseName-attrs-name.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
builtins.fetchurl { url = "https://example.com/foo.tar.gz"; name = "~wobble~"; } |
8 changes: 8 additions & 0 deletions
8
tests/functional/lang/eval-fail-fetchurl-baseName-attrs.err.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: | ||
… while calling the 'fetchurl' builtin | ||
at /pwd/lang/eval-fail-fetchurl-baseName-attrs.nix:1:1: | ||
1| builtins.fetchurl { url = "https://example.com/~wiggle~"; } | ||
| ^ | ||
2| | ||
|
||
error: invalid store path name when fetching URL 'https://example.com/~wiggle~': name '~wiggle~' contains illegal character '~'. Please add a valid 'name' attribute to the argument for 'fetchurl', so that it can create a valid store path. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
builtins.fetchurl { url = "https://example.com/~wiggle~"; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: | ||
… while calling the 'fetchurl' builtin | ||
at /pwd/lang/eval-fail-fetchurl-baseName.nix:1:1: | ||
1| builtins.fetchurl "https://example.com/~wiggle~" | ||
| ^ | ||
2| | ||
|
||
error: invalid store path name when fetching URL 'https://example.com/~wiggle~': name '~wiggle~' contains illegal character '~'. Please pass an attribute set with 'url' and 'name' attributes to 'fetchurl', so that it can create a valid store path. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
builtins.fetchurl "https://example.com/~wiggle~" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters