nix develop: Restore hiding the "dirty" notice#485
Conversation
📝 WalkthroughWalkthroughThe PR adds a ChangesDirty-fetch warning override
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Infer (1.2.0)src/nix/develop.ccsrc/nix/develop.cc:1:10: fatal error: 'nix/util/config-global.hh' file not found ... [truncated 2200 characters] ... l", line 4784, characters 10-1023 Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/nix/develop.cc (1)
499-502: ⚡ Quick winConsider adding a comment explaining the suppression.
While the PR description makes the intent clear, a brief comment would help future maintainers understand why dirty warnings are suppressed for development shells.
📝 Suggested documentation
+ // Suppress dirty Git/Mercurial tree warnings in development shells + // since developers typically work with uncommitted changes. void preRun(ref<Store> store) override { fetchSettings.warnDirty = false; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/nix/develop.cc` around lines 499 - 502, Add a short clarifying comment above the assignment in preRun (method preRun in src/nix/develop.cc) explaining why fetchSettings.warnDirty is set to false (i.e., to suppress dirty-repo warnings for interactive development shells so normal workflow isn't interrupted and to avoid spurious warnings during iterative edits). Keep the comment concise and reference that this behavior is intentional for development shells and not for normal runs so future maintainers understand the suppression.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/nix/develop.cc`:
- Around line 499-502: Add a short clarifying comment above the assignment in
preRun (method preRun in src/nix/develop.cc) explaining why
fetchSettings.warnDirty is set to false (i.e., to suppress dirty-repo warnings
for interactive development shells so normal workflow isn't interrupted and to
avoid spurious warnings during iterative edits). Keep the comment concise and
reference that this behavior is intentional for development shells and not for
normal runs so future maintainers understand the suppression.
Motivation
Restores #33. This was accidentally lost in
823b119.
As a slight improvement over #33, put this in
Commonsonix print-dev-envis affected as well.Context
Summary by CodeRabbit