Skip to content

Lock out new direct construction of Record - #11414

Merged
sholderbach merged 1 commit into
nushell:mainfrom
sholderbach:button-up-record
Dec 24, 2023
Merged

sholderbach merged 1 commit into
nushell:mainfrom
sholderbach:button-up-record

Conversation

@sholderbach

Copy link
Copy Markdown
Member

Description

With #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 #11020 for challenges for this refactor.

Plugin-Author-Facing Changes

This is a breaking change for outside plugins that relied on the pub fields.

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.
@amtoine amtoine added the notes:breaking-changes Noted in Breaking Changes section label Dec 24, 2023
@sholderbach
sholderbach merged commit c1cc1c8 into nushell:main Dec 24, 2023
@sholderbach
sholderbach deleted the button-up-record branch December 24, 2023 12:12
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notes:breaking-changes Noted in Breaking Changes section

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants