Eelco Dolstra
8674792eba
Make the JSON logger more robust
...
We now ignore connection / write errors.
2025-03-14 17:33:48 +01:00
Eelco Dolstra
fd0d824fa5
Don't use DerivedPath::toJSON()
...
It doesn't work on unrealized paths.
2025-03-14 17:06:23 +01:00
mergify[bot]
bdaa8c55d2
Merge pull request #12655 from NixOS/mergify/bp/2.27-maintenance/pr-12645
...
Make debugger significantly faster (backport #12645 )
2025-03-14 13:54:47 +00:00
Sergei Zimmerman
11919bc471
{libexpr,libcmd}: Make debugger significantly faster
...
The underlying issue is that debugger code path was
calling PosTable::operator[] in each eval method.
This has become incredibly expensive since 5d9fdab3de
.
While we are it it, I've reworked the code to
not use std::shared_ptr where it really isn't necessary.
As I've documented in previous commits, this is actually
more a workaround for recursive header dependencies now
and is only necessary in `error.hh` code.
Some ad-hoc benchmarking:
After this commit:
```
Benchmark 1: nix eval nixpkgs#hello --impure --ignore-try --no-eval-cache --debugger
Time (mean ± σ): 784.2 ms ± 7.1 ms [User: 561.4 ms, System: 147.7 ms]
Range (min … max): 773.5 ms … 792.6 ms 10 runs
```
On master 3604c7c51:
```
Benchmark 1: nix eval nixpkgs#hello --impure --ignore-try --no-eval-cache --debugger
Time (mean ± σ): 22.914 s ± 0.178 s [User: 18.524 s, System: 4.151 s]
Range (min … max): 22.738 s … 23.290 s 10 runs
```
(cherry picked from commit adbd08399c
)
2025-03-14 13:22:53 +00:00
Sergei Zimmerman
593e0eebeb
libutil: Fix Pos::getSourcePath
...
Previous implementation didn't actually check if
std::get_if returned a nullptr:
std::optional<SourcePath> getSourcePath() const {
return *std::get_if<SourcePath>(&origin);
}
(cherry picked from commit 50123f2a56
)
2025-03-14 13:22:52 +00:00
Sergei Zimmerman
8c2a792d2b
libutil: Document hacks and problems around Pos class
...
This should provide context for follow-up commits in
the patch series.
(cherry picked from commit bf12aedf2e
)
2025-03-14 13:22:52 +00:00
Sergei Zimmerman
b540c2419f
{libutil,libexpr}: Move pos-idx,pos-table code to libutil
...
All of this code doesn't actually depend on anything from
libexpr. Because Pos is so tigtly coupled with Error, it
makes sense to have in the same library.
(cherry picked from commit a53b184e63
)
2025-03-14 13:22:52 +00:00
Eelco Dolstra
762114b7c4
Log BuildResult
2025-03-13 19:42:52 +01:00
Eelco Dolstra
c515bc66f1
Provide a structured JSON serialisation of hashes
2025-03-13 18:52:29 +01:00
Eelco Dolstra
2a2af3f72f
Logger::result(): Support logging arbitrary JSON objects
2025-03-13 18:39:46 +01:00
Eelco Dolstra
220000dc1a
makeJSONLogger(): Support logging to a Unix domain socket
2025-03-13 15:48:52 +01:00
Eelco Dolstra
d9730fc93b
Fix fd check
2025-03-13 15:42:17 +01:00
Eelco Dolstra
1efccf34b1
JSONLogger: Acquire a lock to prevent log messages from clobbering each other
2025-03-13 13:58:35 +01:00
Eelco Dolstra
29a9e638c1
Remove "@nix" prefix from json-log-path output
2025-03-13 13:37:38 +01:00
Eelco Dolstra
2972e73946
Turn NIX_LOG_FILE into a setting
2025-03-13 13:15:14 +01:00
Eelco Dolstra
1f702cdb01
Allow separate JSON logging
...
If the NIX_LOG_FILE environment variable is set, Nix will write JSON
log messages to that file in addition to the regular logger (e.g. the
progress bar).
2025-03-13 12:52:15 +01:00
Eelco Dolstra
8ef94c1114
Add a structured log message for FOD hash mismatches
2025-03-13 12:52:15 +01:00
Eelco Dolstra
1212b1fbfe
JSONLogger: Log to a file descriptor instead of another Logger
...
Logging to another Logger was kind of nonsensical - it was really just
an easy way to get it to write its output to stderr, but that only
works if the underlying logger writes to stderr.
This change is needed to make it easy to log JSON output somewhere
else (like a file or socket).
2025-03-13 12:52:15 +01:00
Graham Christensen
f988d9edbf
Merge pull request #12 from DeterminateSystems/update-upgrade-docs
...
Update upgrade docs
2025-03-12 13:23:41 +00:00
Luc Perkins
70f08ee91c
Merge pull request #11 from DeterminateSystems/revamp-introduction
...
Change title in introduction
2025-03-12 13:22:54 +00:00
Luc Perkins
b62167a014
Update upgrade docs
2025-03-07 14:53:22 -03:00
Luc Perkins
644f79dfd8
Add installation instructions to intro
2025-03-07 14:18:04 -03:00
Graham Christensen
d1ec1b7eff
Merge pull request #10 from DeterminateSystems/grahamc-patch-1
...
Publish the flake as public, every time
2025-03-06 23:42:09 +00:00
Graham Christensen
fd6231e612
Publish the flake as public, every time
...
This exposed a bug in FlakeHub's private toggling, where the public 3.0.0 release followed by an accidentally private 0.1.x release, managed to cause the flake to be shunted closed.
This should not be possible, so let's dig into how that came to be and make sure to create a test case against this should-be-impossible transition.
2025-03-06 15:36:43 -08:00
Luc Perkins
4f6d3299a4
Change document title
2025-03-06 14:42:58 -03:00
Luc Perkins
fea4ee8c5e
Merge pull request #9 from DeterminateSystems/nix-channel-deprecated
...
Move nix-channel under deprecated commands
2025-03-06 17:37:54 +00:00
Luc Perkins
aaf1967faa
Remove default Nix expression links
2025-03-05 17:49:23 -03:00
Luc Perkins
0f04d36c73
Remove default Nix expression doc from summary
2025-03-05 17:45:11 -03:00
Luc Perkins
d67db97abb
Remove channels link
2025-03-05 17:41:24 -03:00
Luc Perkins
1a5c4d49e4
Merge pull request #8 from DeterminateSystems/uninstallation-instructions
...
Revamp uninstallation docs
2025-03-05 20:38:27 +00:00
Luc Perkins
e2bc5e3774
Remove default Nix expression doc
2025-03-05 17:37:59 -03:00
Luc Perkins
e6a6bcbb73
Move nix-channel under deprecated commands
2025-03-05 17:30:47 -03:00
Luc Perkins
cef7855523
Fix merge conflict
2025-03-05 17:27:03 -03:00
Luc Perkins
39d99ebaa3
Merge pull request #7 from DeterminateSystems/github-links
...
Update GitHub links
2025-03-05 20:18:16 +00:00
Luc Perkins
f76ef9d4d3
Merge pull request #6 from DeterminateSystems/nix-installer-recommandation
...
Recommend only the Determinate Nix Installer
2025-03-05 20:07:26 +00:00
Luc Perkins
42606c16ad
Remove one more reference to binary doc
2025-03-05 16:59:50 -03:00
Luc Perkins
4323868244
Remove links to binary doc
2025-03-05 16:55:45 -03:00
Luc Perkins
c451f60cc7
Revamp uninstallation docs
2025-03-05 16:51:55 -03:00
Luc Perkins
6381e06537
Reinstate binary doc
2025-03-05 16:46:46 -03:00
Luc Perkins
e09c7fe22d
Update GitHub links
2025-03-05 16:44:21 -03:00
Luc Perkins
ff691e761b
Delete binary installation doc
2025-03-05 16:39:03 -03:00
Luc Perkins
be9fbb04bb
Remove environment variables doc
2025-03-05 16:35:55 -03:00
Luc Perkins
af23843434
Remove macOS sequoia recommandations
2025-03-05 16:31:18 -03:00
Graham Christensen
ad264674e6
Merge pull request #5 from DeterminateSystems/release-v3.0.0/450c61ee-23f7-4767-a960-ee12b7d84605
...
Release v3.0.0
2025-03-05 18:48:59 +00:00
github-actions[bot]
8b7b413e8b
Prepare release v3.0.0
2025-03-05 18:44:02 +00:00
Eelco Dolstra
853252b3ae
Merge pull request #3 from DeterminateSystems/grahamc-patch-1
...
Fixup propose-release: don't puke if the version number didn't change
2025-03-05 18:26:15 +00:00
Graham Christensen
07d8bf7a66
Fixup propose-release: don't puke if the version number didn't change
2025-03-05 10:09:06 -08:00
Eelco Dolstra
4e607c9ff3
Merge pull request #2 from DeterminateSystems/sync-with-2.26
...
Sync with 2.26
2025-03-05 17:49:44 +00:00
Eelco Dolstra
25ba7c55d3
Merge remote-tracking branch 'origin/2.26-maintenance' into sync-with-2.26
2025-03-05 18:01:03 +01:00
mergify[bot]
96f0fd3ce0
Merge pull request #12605 from NixOS/mergify/bp/2.27-maintenance/pr-12604
...
Fix chopped up repl output (backport #12604 )
2025-03-04 19:33:00 +00:00