Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn developers when two cmd params of the same type are inserted #84

Open
azriel91 opened this issue Feb 28, 2023 · 0 comments
Open

Warn developers when two cmd params of the same type are inserted #84

azriel91 opened this issue Feb 28, 2023 · 0 comments

Comments

@azriel91
Copy link
Owner

azriel91 commented Feb 28, 2023

Since Resources is a type map, when a cmd param (workspace_param, profile_param, flow_param) is inserted, params of the same type will overwrite a previous entry. This may or may not be desired, so warning every time is noise.

Desired overwrites:

  • Saved params overwritten by newly provided params
  • Profile / Flow param being more specific than Workspace param.

Undesired overwrites:

  • Profile / Flow param using the same type as a Workspace param.

Maybe there is no software solution.

Found during writing tests that assert on workspace params / flow params insertion.


Current insertions are in CmdCtxBuilder::*_params_insert. Search for resources.insert_raw.

This may also apply to peace_code_gen::cmd::impl_build.

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

No branches or pull requests

1 participant