Eelco Dolstra
0194f81587
addToStore(): Do evaluation on the main stack
...
This hopefully avoids the need for all our Boehm GC coroutine
workarounds, since the GC roots will be on the main stack of the
thread.
Fixes #11141 .
2024-07-24 16:24:38 +02:00
Eelco Dolstra
498eed0a25
~FramedSource(): Don't throw an exception if the remote has disconnected
...
This would cause the daemon to crash with a call to terminate().
2024-07-23 10:56:29 +02:00
Eelco Dolstra
40f80e1b5c
Merge pull request #11142 from detroyejr/fix-alias-flags
...
Allow flag aliases
2024-07-22 15:53:41 +02:00
poweredbypie
0ec5e3a1bc
Progress on Wine CI support, MinGW dev shell with Meson ( #10975 )
...
* Only build perl subproject on Linux
* Fix various Windows regressions
* Don't put the emulator hook in test builds
We run the tests in a separate derivation. Only need it for the dev shell.
* Fix native dev shells
* Fix cross dev shells we don't know how to emulate
Co-authored-by: PoweredByPie <poweredbypie@users.noreply.github.com>
Co-authored-by: Joachim Schiele <js@lastlog.de>
Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
2024-07-21 22:03:04 +00:00
detroyejr
74dccef004
addFlag: use aliases
2024-07-19 15:05:00 -04:00
Eelco Dolstra
fa7aa0389a
FdSource: Fix operator =
...
This wasn't moving the underlying buffer, so if the buffer was
non-empty, it could lose data.
2024-07-18 16:10:48 +02:00
Eelco Dolstra
1e1a8e8ad1
Merge pull request #11058 from hercules-ci/more-nix-shell
...
Make `#!nix-shell` arguments and options relative to script
2024-07-17 21:52:34 +02:00
Eelco Dolstra
621c23bbea
Merge pull request #11113 from NixOS/doc-comment-unordered-map
...
Doc comments: use std::unordered_map
2024-07-17 16:50:48 +02:00
Robert Hensing
d0e9878389
Remove unused boost include and split out std-hash.hh
...
Splitting it out immediately answers questions like [this],
without increasing the number of compilation units.
I did consider using boost::hash_combine instead, but it doesn't seem
to be quite as capable, accepting only two arguments.
[this]: https://github.com/NixOS/nix/pull/11113#discussion_r1679991573
2024-07-16 22:31:25 +02:00
Eelco Dolstra
3d8fa9f668
Pos::getSnippetUpTo(): Fix warning
2024-07-16 16:34:13 +02:00
Eelco Dolstra
042c2ae3ac
Merge remote-tracking branch 'origin/master' into detsys-main
2024-07-16 13:54:16 +02:00
Eelco Dolstra
9c6678da0e
Merge pull request #11092 from DeterminateSystems/hash-SourcePath
...
Use std::unordered_map for the EvalState caches
2024-07-16 11:06:43 +02:00
Robert Hensing
61a4d3d45c
getSnippetUpTo: Return optional
...
This makes it possible to certain discern failures from empty
snippets, which I think is an ok review comment.
Maybe it should do so for swapped column indexes too, but I'm not
sure.
I don't think it matters in the grand scheme. We don't even have
a real use case for `nullopt` now anyway.
Since we don't have a use case, I'm not applying this logic to
higher level functions yet.
2024-07-15 20:10:45 +02:00
Robert Hensing
d4f576b0b2
nix repl: Render docs for attributes
2024-07-15 19:56:40 +02:00
Robert Hensing
e5af7cbeb9
libutil: Add Pos::getSnippetUpTo(Pos)
2024-07-15 18:41:11 +02:00
Eelco Dolstra
550b3479cf
Include the accessor in the SourcePath hash
2024-07-15 15:46:30 +02:00
Robert Hensing
7e604f716c
concatStrings: Give compiler access to definition for inlining
...
... at call sites that are may be in the hot path.
I do not know how clever the compiler gets at these sites.
My primary concern is to not regress performance and I am confident
that this achieves it the easy way.
2024-07-14 12:20:45 +02:00
Robert Hensing
97e01107ec
dropEmptyInitThenConcatStringsSep -> concatStringSep: empty separator
...
When the separator is empty, no difference is observable.
Note that concatStringsSep has centralized definitions. This adds the
required definitions. Alternatively, `strings-inline.hh` could be
included at call sites.
2024-07-14 12:10:39 +02:00
Robert Hensing
d40fdb5711
dropEmptyInitThenConcatStringsSep: Update doc and deprecate
2024-07-14 11:50:20 +02:00
Robert Hensing
1c97718146
dropEmptyInitThenConcatStringsSep: Allow it to drop items again
...
It's usually harmless, if it occurs at all.
2024-07-13 03:06:24 +02:00
Robert Hensing
9ca42d5da2
dropEmptyInitThenConcatStringsSep -> concatStringSep: setting value was already harmed
...
Considering that `value` was probably parsed with tokenizeString
prior, it's unlikely to contain empty strings, and we have no
reason to remove them either.
2024-07-13 03:06:24 +02:00
Robert Hensing
4029426ca8
dropEmptyInitThenConcatStringsSep -> concatStringSep: tokens from tokenizeString are not empty
2024-07-13 03:06:24 +02:00
Robert Hensing
0fe3525223
illegal configuration line -> syntax error in configuration line
...
The law has nothing to do with this, although I do feel like a
badass when I mess with the config.
I'm a conf artist.
2024-07-13 03:06:24 +02:00
Robert Hensing
3b77f13451
dropEmptyInitThenConcatStringsSep -> concatStringSep: experimental features do not render as empty strings
2024-07-13 03:06:24 +02:00
Robert Hensing
a681d354e7
Add fresh concatStringsSep without bug
...
The buggy version was previously renamed to
dropEmptyInitThenConcatStringsSep
2024-07-13 03:06:24 +02:00
Robert Hensing
79eb0adf9d
dropEmptyInitThenConcatStringSep: Check that we don't drop...
...
... initial empty strings.
The tests pass, which is encouraging.
2024-07-13 03:05:50 +02:00
Robert Hensing
1a8defd06f
Refactor: rename C++ concatStringsSep -> dropEmptyInitThenConcatStringsSep
2024-07-13 03:05:50 +02:00
John Ericson
bc83b9dc1f
Remove comparator.hh and switch to <=> in a bunch of places
...
Known behavior changes:
- `MemorySourceAccessor`'s comparison operators no longer forget to
compare the `SourceAccessor` base class.
Progress on #10832
What remains for that issue is hopefully much easier!
2024-07-12 14:54:18 -04:00
Eelco Dolstra
cdc23b67a6
Provide std::hash<SourcePath>
2024-07-12 17:54:27 +02:00
Robert Hensing
8df041cbc6
Solve unused header warnings reported by clangd
2024-07-12 15:37:54 +02:00
Robert Hensing
f070d68c32
Add BaseError assignment operators
...
The move assignment was implicitly generated and used in
src/libstore/build/goal.cc:90:22:
90 | this->ex = std::move(*ex);
Clang warns about this generated method being deprecated, so making
them explicit fixes the warning.
2024-07-12 14:25:16 +02:00
Eelco Dolstra
61080554ab
SymbolStr: Remove std::string conversion
...
This refactoring allows the symbol table to be stored as something
other than std::strings.
2024-07-11 17:43:10 +02:00
Robert Hensing
4fd8f19ecf
Fix build to use CanonPath in new FSO sinks
2024-07-11 12:14:48 +02:00
Robert Hensing
86420753ec
Merge remote-tracking branch 'upstream/master' into support-hardlinks-in-tarballs
2024-07-11 11:43:02 +02:00
Eelco Dolstra
1b52a3add1
Remove references to nix-command
2024-07-10 20:35:44 +02:00
Eelco Dolstra
e638d00223
Stabilize the "nix-command" feature
2024-07-10 20:35:44 +02:00
Eelco Dolstra
50d7ce6c6a
Actually remove the "flakes" experimental feature
...
To avoid annoying warnings, this is now a "stabilized" feature.
2024-07-10 18:47:28 +02:00
Graham Christensen
590920eed2
Make the flakes experimental feature stable
2024-07-10 16:36:57 +02:00
Robert Hensing
d942d505ca
Merge remote-tracking branch 'upstream/master' into more-nix-shell
2024-07-10 16:19:18 +02:00
John Ericson
d8850618b6
Merge pull request #11059 from rhendric/rhendric/reference-manual
...
docs: merge builtin-constants into builtins
2024-07-07 21:47:33 -04:00
Ryan Hendrickson
95890b3e1d
docs: merge builtin-constants into builtins
2024-07-07 15:57:23 -04:00
Robert Hensing
f5b59fbc64
Fix and extend nix-shell baseDir test
2024-07-07 00:23:22 +02:00
Robert Hensing
0729f0a113
packaging: Pass version directly
2024-07-06 17:52:57 +02:00
John Ericson
ff9b6d0e1f
Merge pull request #11037 from fricklerhandwerk/document-config-parsing
...
use self-descriptive name for config file parser, document
2024-07-05 15:21:26 -04:00
Robert Hensing
ddff76f667
Merge pull request #10973 from NixOS/meson-libexpr
...
Meson build for libexpr libflake, external C API, unit tests
2024-07-05 20:27:12 +02:00
Eelco Dolstra
8f280d72ff
Merge pull request #11019 from DeterminateSystems/fix-failed-to-open-archive
...
Tarball fetcher: Fix handling of cached tarballs
2024-07-05 17:10:02 +02:00
Eelco Dolstra
e7e070d36b
Document
2024-07-05 16:29:16 +02:00
Valentin Gagarin
c66079f1e8
use self-descriptive name for config file parser, document
...
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-07-04 10:36:48 +02:00
siddhantCodes
976c05879f
factor duplicate code into util function append
2024-07-04 11:09:23 +05:30
John Ericson
30de61f16d
Merge pull request #11018 from siddhantk232/canonpath-fs-sink
...
Use `CanonPath` in `fs-sink.hh`
2024-07-03 10:36:18 -04:00