Ben Burdette
b4c24a29c6
back to ref<EvalState> in NixRepl
2022-05-25 10:21:20 -06:00
Eelco Dolstra
27ebb97d0a
Handle EOFs in string literals correctly
...
We can't return a STR token without setting a valid StringToken,
otherwise the parser will crash.
Fixes #6562 .
2022-05-25 17:58:13 +02:00
Eelco Dolstra
d8398d33c9
Typo
2022-05-25 15:29:27 +02:00
Eelco Dolstra
89a8955e79
Merge remote-tracking branch 'origin/file-fetcher'
2022-05-25 15:15:16 +02:00
Eelco Dolstra
2f8a34cddc
Fix warning
2022-05-25 15:05:39 +02:00
pennae
b092afe77d
Merge branch 'master' into lto
2022-05-25 11:55:13 +00:00
Eelco Dolstra
91b7d5373a
Style tweaks
2022-05-25 12:32:22 +02:00
Maximilian Bosch
b916c08feb
libfetchers: drop getGitDir
and hardcode .git
...
As discussed[1] this is most likely not desirable.
[1] https://github.com/NixOS/nix/pull/6440#issuecomment-1120876248
2022-05-24 14:20:48 +02:00
Ben Burdette
ba035f7dd0
comment
2022-05-23 10:13:47 -06:00
Théophane Hufschmitt
1e7c27cb91
Merge pull request #6560 from ncfavier/patch-1
...
typo: defaultApps → defaultApp
2022-05-23 17:08:06 +02:00
Théophane Hufschmitt
50ab1587bf
Merge pull request #6532 from flox/show_warning
...
fix: alignment during flake show of legacyPackages
2022-05-23 09:30:26 +02:00
Ben Burdette
13d02af079
remove redundant 'debugMode' flag
2022-05-22 21:45:24 -06:00
Ben Burdette
7ccb2700c0
comments
2022-05-22 19:15:58 -06:00
Ben Burdette
5bc97fdfa6
change state derefs
2022-05-22 19:12:03 -06:00
Ben Burdette
34ffaa9f57
changning repl to use EvalState& instead of ref
2022-05-22 18:57:45 -06:00
Naïm Camille Favier
81a9bf0ad2
typo: defaultApps → defaultApp
2022-05-21 14:41:24 +02:00
Ben Burdette
982c8a959b
remove special tryEval behavior
2022-05-20 12:45:36 -06:00
Ben Burdette
884d591787
debugRepl ftn pointer
2022-05-20 10:33:50 -06:00
Tom Bereknyei
7a04fb1c56
repl: add repl-flake experimental feature for gating
2022-05-20 08:20:00 -04:00
tomberek
542e36c6e7
Apply suggestions from code review
...
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2022-05-20 01:48:24 -04:00
Tom Bereknyei
db613a85fb
repl: allow --file to always utilize autoargs
2022-05-20 01:35:06 -04:00
tomberek
7d7e00272a
Apply suggestions from code review
...
Style fixes from @edolstra
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2022-05-20 01:28:20 -04:00
Ben Burdette
0600df86b8
'debugMode'
2022-05-19 17:01:23 -06:00
Ben Burdette
7ddef73d02
de-const evalState exceptions
2022-05-19 12:44:40 -06:00
Ben Burdette
f9cdb6af8d
Merge branch 'debug-exploratory-PR' into debuggerHook-eval-arg
2022-05-19 11:07:18 -06:00
Ben Burdette
357fb84dba
use an expr->StaticEnv table in evalState
2022-05-19 10:48:10 -06:00
Tony Olagbaiye
5b8c1deb18
fetchTree: Allow fetching plain files
...
Add a new `file` fetcher type, which will fetch a plain file over
http(s), or from the local file.
Because plain `http(s)://` or `file://` urls can already correspond to
`tarball` inputs (if the path ends-up with a know archive extension),
the URL parsing logic is a bit convuluted in that:
- {http,https,file}:// urls will be interpreted as either a tarball or a
file input, depending on the extensions of the path part (so
`https://foo.com/bar ` will be a `file` input and
`https://foo.com/bar.tar.gz ` as a `tarball` input)
- `file+{something}://` urls will be interpreted as `file` urls (with
the `file+` part removed)
- `tarball+{something}://` urls will be interpreted as `tarball` urls (with
the `tarball+` part removed)
Fix #3785
Co-Authored-By: Tony Olagbaiye <me@fron.io>
2022-05-19 18:24:49 +02:00
Tom Bereknyei
f21dec5bef
repl: hide flake behavior behind flag and provide warning
2022-05-19 01:02:24 -04:00
Tom Bereknyei
e1f308a1ec
repl: provide backward compat with legacy usage
2022-05-18 22:28:15 -04:00
Tom Bereknyei
7534798eed
refactor: factor out getValue
2022-05-18 21:36:50 -04:00
tomberek
9f8c1183fa
Apply suggestions from code review
...
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2022-05-18 21:21:58 -04:00
Tom Bereknyei
1ca3f6035d
repl: update docs with installables
2022-05-18 21:21:38 -04:00
Tom Bereknyei
5640b52834
repl: use installables
2022-05-18 21:20:59 -04:00
Tom Bereknyei
81567a0962
repl: allow loading installables from CLI
...
repl: search installable with findAlongAttrPath
repl: refactor handling of args
repl: temp
2022-05-18 21:20:59 -04:00
Timothy DeHerrera
06d57ce759
nix repl: load flakes from cli args
...
If experimental feature "flakes" is enabled, args passed to `nix repl`
will now be considered flake refs and imported using the existing
`:load-flake` machinery.
In addition, `:load-flake` now supports loading flake fragments.
2022-05-18 21:20:59 -04:00
Théophane Hufschmitt
452ffe5464
Hint at the source file on conflict in flake new
...
Add a pointer to the source file (from the template) when `nix flake new` (or `init`) encounters an already existing file
Fix #6542
2022-05-18 16:46:13 +02:00
Théophane Hufschmitt
78dc64ec1e
Merge pull request #6544 from ncfavier/getFlake-no-write-lock-file
...
Do not attempt to write a lock file in builtins.getFlake
2022-05-18 16:41:13 +02:00
Naïm Favier
169384abb2
Do not attempt to write a lock file in builtins.getFlake
...
Fixes https://github.com/NixOS/nix/issues/6541
2022-05-18 15:45:06 +02:00
zhujun
b8e44dc62b
primop_match: fix example letter case in document
2022-05-18 14:05:26 +08:00
Ben Burdette
667074b586
first whack at passing evalState as an arg to debuggerHook.
2022-05-16 09:20:51 -06:00
Théophane Hufschmitt
43a2c13672
Make nix::eval_cache::int_t more idiomatic
...
Don’t explicitely give it a constructor, but use aggregate
initialization instead (also prevents having an implicit coertion, which
is probably good here)
2022-05-16 16:36:21 +02:00
Eli Kogan-Wang
e53349dd6e
change priority conflict message
2022-05-16 16:16:06 +02:00
Eli Kogan-Wang
27d0f6747d
resolve redundant priority passing, wrap NixInt in eval-cache variant
2022-05-16 15:17:35 +02:00
Eli Kogan-Wang
c81d24f1c7
Add int to eval-cache, bump eval cache schema version
2022-05-16 02:29:29 +02:00
elikoga
0cea59ab4b
Merge branch 'NixOS:master' into master
2022-05-16 01:01:37 +02:00
Ben Burdette
86ba0a702c
fix thunk issue
2022-05-15 12:05:51 -06:00
Ben Burdette
6faa56ea1f
remove extra argument
2022-05-15 12:05:34 -06:00
Eli Kogan-Wang
be2b19041e
Integrate review changes
2022-05-13 22:02:28 +02:00
Tom Bereknyei
8150b93968
fix: alignment during flake show of legacyPackages
...
Fixes:
https://github.com/NixOS/nix/issues/6240
https://github.com/NixOS/nix/issues/6045
2022-05-13 11:12:11 -04:00
Eelco Dolstra
bf89cd95a4
Merge pull request #6525 from J-Swift/feature/bash-prefix
...
Add `bash-prompt-prefix` option
2022-05-13 14:06:07 +02:00