-
Notifications
You must be signed in to change notification settings - Fork 2
nix flake check: Fix output rendering #239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughCleanup in LocalStore::addToStore now always attempts to skip narSize and silence exceptions instead of parsing a dump; flake output formatting was simplified to print only the header and resolved string. Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant LocalStore
participant Source
Caller->>LocalStore: addToStore(...)
alt previous flow (before)
LocalStore->>Source: attempt read (narRead false)
Note right of LocalStore: tried parseDump fallback\nwith NullFileSystemObjectSink
Source-->>LocalStore: read failure / skip not used
LocalStore->>LocalStore: parseDump(...) as fallback
else new flow (after)
LocalStore->>Source: call source.skip(narSize) within try
Source-->>LocalStore: may throw (ignored)
LocalStore->>Caller: cleanup complete
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
Comment |
Changes
```
git+file:///home/eelco/Dev/nix
├───checks
│ ├───aarch64-darwin
│ │ ├───installerScriptForGHA: omitted 'omitted (use '--all-systems' to show)'
...
└───nix-util-tests-stdenv: derivation 'package 'nix-util-tests-3.11.3''
```
to
```
git+file:///home/eelco/Dev/nix
├───checks
│ ├───aarch64-darwin
│ │ ├───installerScriptForGHA: omitted (use '--all-systems' to show)
...
└───nix-util-tests-stdenv: package 'nix-util-tests-3.11.3'
```
f408f3b to
35a8e60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/libstore/local-store.cc(1 hunks)src/nix/flake.cc(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/libstore/local-store.cc (1)
src/libstore/dummy-store.cc (4)
source(186-250)source(186-193)info(160-184)info(160-160)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build_aarch64-darwin / build
- GitHub Check: build_x86_64-linux / build
🔇 Additional comments (1)
src/nix/flake.cc (1)
1385-1385: LGTM! Cleaner output format.The simplified format removes redundant type prefixes and extra quotes. The variable
salready contains the formatted string with appropriate context (e.g., "package 'name'" for derivations, full message for omitted items).
`skip()` can throw an exception, which we need to ignore since we may be unwinding an exception.
Motivation
Changes
to
Also includes a simplification to
LocalStore::addToStore().Context
Summary by CodeRabbit
Style
Refactor