Skip to content

Conversation

@LoicRiegel
Copy link
Contributor

Description of changes

What I was trying to improve

  • decl ids used for keywords like "let", "if" etc... were defined statically, whereas they are generated dynamically in nushell. So the hard coded ids were very likely to become invalid every time we update nu.
  • Some of the hard coded ids currently used were actually already wrong!

After my changes:

  • The code now gets the decl names by id without the need for hard coded values
  • Thus we use the right ones

The tests still pass.

Friendly reminder that's I'm still quite new to Rust, but eager to improve, so any improvement suggestion is more than welcome :)

Relevant Issues

None

@fdncred fdncred merged commit feafe69 into nushell:main Apr 28, 2025
5 checks passed
@fdncred
Copy link
Contributor

fdncred commented Apr 28, 2025

Thanks

@LoicRiegel LoicRiegel deleted the DeclId branch April 29, 2025 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants