We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, if a new config is added to a .k file using the OverrideFile API, the equal sign will be used. For example:
// Overriding prod/main.k: // before override container: Container { } // after override container: Container { envs = { "FOO": "BAR" } }
But sometimes this behavior is not expected, because the .k file is to be compiled together with other .k files. For example:
// base/base.k: already exists some envs container: Container { envs: { "aaa": "bbb" } }
If prod/main.k is supposed to be compiled together with base/base.k, overriding using the equal sign will drop all the existing envs in base/base.k.
The expected behavior is that the OverrideFile API providing a new param, indicating whether to use equal sign or colon. For example:
overrideUsingColon := true kclapi.OverrideFile(file, overrides, deps, overrideUsingColon)
The text was updated successfully, but these errors were encountered:
I think we can extend the spec https://www.kcl-lang.io/docs/user_docs/guides/automation#2-use-kcl-cli-for-automation with the : and += attribute operators. cc @zong-zhe
:
+=
Sorry, something went wrong.
zong-zhe
Successfully merging a pull request may close this issue.
Enhancement
Currently, if a new config is added to a .k file using the OverrideFile API, the equal sign will be used. For example:
But sometimes this behavior is not expected, because the .k file is to be compiled together with other .k files. For example:
If prod/main.k is supposed to be compiled together with base/base.k, overriding using the equal sign will drop all the existing envs in base/base.k.
The expected behavior is that the OverrideFile API providing a new param, indicating whether to use equal sign or colon. For example:
The text was updated successfully, but these errors were encountered: