Repository navigation
feat(error make)!: raise errors for invalid labels - #18755
Merged
Merged
Conversation
done in 2 stages: - collect all missing column errors and return - if all columns present, collect conversion errors and return
KaiSforza
added a commit
to KaiSforza/nushell
that referenced
this pull request
Sep 16, 2026
## Description The recent changes in nushell#18755 made it so that errors defined with a simple `label: {span: ...}` but no `text` value will cause an error (not the one the user is expecting), when a blank `text` field for a label can be used to simply underline the span. This will still cause an error if `span` is not defined for each label, though. - Reverts the change in nushell#18755 that removed the default `text: ""` value to simply underline labels that only have a span. - Maintains the requirement for a `span` in each label ## User-facing changes (Release notes) - Adds a default value to `error make`'s labels `text` ## Additional notes - Reverts parts of nushell#18755
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.
$inand$itinside a block #4460Description
Not providing spans for error labels fell back to using the error label record's own span instead. This lead to confusing outcomes, especially because the error label's structure changed at some point:
record<text: string, start: int, end: int>record<text: string, span: record<start: int, end: int>>User-facing changes (Release notes)
Errors for...
error make?Not specifying the span for error labels (or not doing so correctly) confusingly fell back to using the record's own span instead:
So
error makesucceeded instead of throwing an error. Well, it did throw an error, the one user was trying to, not the one it should due toerror makereceiving an invalid argument.From now on
error makewill raise an error of its own when receiving an invalid argument.