Skip to content

feat!(parser): type inference following cell paths - #17673

Merged
cptpiepmatz merged 9 commits into
nushell:mainfrom
blindFS:fix_cellpath_type
Mar 5, 2026
Merged

cptpiepmatz merged 9 commits into
nushell:mainfrom
blindFS:fix_cellpath_type

Conversation

@blindFS

@blindFS blindFS commented Feb 28, 2026 •

Copy link
Copy Markdown
Contributor

Release notes summary - What our users need to know

New experimental option cell-path-types

Added a new experimental option named cell-path-types which enforces type inferencing on cell path expressions like {foo: 1}.foo if enabled. That means the following examples (previously caused runtime errors or ran successfully) will be rejected by the parser:

let foo: string = [1].0
mut foo = {bar: 0}
$foo.bar = 1.0
let foo = [1]
def bar [baz: string] { }
bar $foo.0

Tasks after submitting

  • Tests
  • Tracking issue

@github-actions github-actions Bot added A:parser Issues related to parsing A:LSP Language Server Protocol (nu-lsp) labels Feb 28, 2026
@blindFS
blindFS force-pushed the fix_cellpath_type branch from ed74737 to f142a83 Compare March 1, 2026 02:15
@blindFS
blindFS marked this pull request as ready for review March 1, 2026 02:16
@blindFS blindFS mentioned this pull request Mar 2, 2026
2 tasks done
@cptpiepmatz
cptpiepmatz self-requested a review March 3, 2026 00:12
Comment thread crates/nu-protocol/src/ty.rs Resolved
Comment thread crates/nu-protocol/src/ty.rs Resolved
Comment thread tests/repl/test_parser.rs Resolved
@github-actions github-actions Bot added the A:plugins This issue is about plugins label Mar 4, 2026
@blindFS
blindFS force-pushed the fix_cellpath_type branch from 15786f4 to 34637b0 Compare March 4, 2026 13:01
@github-actions github-actions Bot removed the A:plugins This issue is about plugins label Mar 4, 2026
@cptpiepmatz cptpiepmatz added the notes:additions Noted in "Additions" section label Mar 4, 2026
@cptpiepmatz

Copy link
Copy Markdown
Member

Thank you, the PR looks great now. I think this would become a highlight and for that is the changelog entry a bit small. If you could expand it and provide some examples, that would be awesome.

Sorry for making you write more docs than in other PRs but these things are very user facing and I think people should know.

@blindFS

blindFS commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

Thank you, the PR looks great now. I think this would become a highlight and for that is the changelog entry a bit small. If you could expand it and provide some examples, that would be awesome.

Sorry for making you write more docs than in other PRs but these things are very user facing and I think people should know.

Thanks for the reminder, I should've updated the description. I think I'm gonna to show some failing examples later, feel free to revise it afterwards.

@cptpiepmatz cptpiepmatz added the notes:ready Indicates Ready for Release notes label Mar 5, 2026
@cptpiepmatz

Copy link
Copy Markdown
Member

That looks good, thank you

@cptpiepmatz
cptpiepmatz merged commit 58ed6ba into nushell:main Mar 5, 2026
17 checks passed
@github-actions github-actions Bot added this to the v0.112.0 milestone Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A:LSP Language Server Protocol (nu-lsp) A:parser Issues related to parsing notes:additions Noted in "Additions" section notes:ready Indicates Ready for Release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants