Repository navigation
Lock out new direct construction of Record - #11414
Merged
Merged
Conversation
With nushell#11386 we don't have any nushell-internal code directly accessing the `vals` field of `Record`, so let's make it private so everyone in the future uses the checked ways guaranteeing matching cols/vals. The `cols` feel has to remain pub for now as `rename` still directly mutates this field. See nushell#11020 for challenges for this refactor. This is a breaking change for outside plugins that relied on the pub fields.
dmatos2012
pushed a commit
to dmatos2012/nushell
that referenced
this pull request
Feb 20, 2024
# Description With nushell#11386 we don't have any nushell-internal code directly accessing the `vals` field of `Record`, so let's make it private so everyone in the future uses the checked ways guaranteeing matching cols/vals. The `cols` feel has to remain pub for now as `rename` still directly mutates this field. See nushell#11020 for challenges for this refactor. # Plugin-Author-Facing Changes This is a breaking change for outside plugins that relied on the `pub` fields.
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.
Description
With #11386 we don't have any nushell-internal code directly accessing the
valsfield ofRecord, so let's make it private so everyone in the future uses the checked ways guaranteeing matching cols/vals.The
colsfeel has to remain pub for now asrenamestill directly mutates this field. See #11020 for challenges for this refactor.Plugin-Author-Facing Changes
This is a breaking change for outside plugins that relied on the
pubfields.