refactor: perfect-forward remaining error ctors - #16309
Merged
Merged
Conversation
Uneventful, except `FileTransferError` used `args` twice: once for the base class, once for a second `HintFmt` that overwrote the first result. Can't forward twice, so now it formats once and mutates in place. Assisted-by: Claude Code (Claude Opus 5)
roberth
requested review from
xokdvium
and removed request for
Ericson2314 and
edolstra
August 16, 2026 08:32
xokdvium
reviewed
Aug 16, 2026
| static SerialisationError badArchive(std::string_view s, Args &&... args) | ||
| { | ||
| return SerialisationError("bad archive: " + s, args...); | ||
| return SerialisationError("bad archive: " + s, std::forward<Args>(args)...); |
Contributor
There was a problem hiding this comment.
Seems pretty cursed that we dynamically construct the format string here.
Contributor
There was a problem hiding this comment.
But that's pre-existing, so meh
xokdvium
approved these changes
Aug 16, 2026
xokdvium
left a comment
Contributor
There was a problem hiding this comment.
Probably inconsequential, but I like the consistency and good practices so LGTM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up on #16296 (comment) that I had already started.
Uneventful, except
FileTransferErrorusedargstwice: once for the base class, once for a secondHintFmtthat overwrote the first result. Can't forward twice, so now it formats once and mutates in place.Assisted-by: Claude Code (Claude Opus 5)
Motivation
cleanup
Context
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.