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

Toolchain environment override environment variable names now must be upper-case #728

Closed
adamgreig opened this issue Nov 12, 2022 · 3 comments

Comments

@adamgreig
Copy link
Contributor

In 0.3 and before #687, environment variable names for overrides such as AMARANTH_ENV_Diamond used the same case as the toolchain name (e.g., Diamond). After #687 the use of tool_env_var() inadvertently(?) causes all names to require upper-case, e.g. AMARANTH_ENV_DIAMOND. The upper-case name doesn't work in 0.3, and the previous mixed-case name no longer works.

@whitequark whitequark added the bug label Nov 12, 2022
@whitequark whitequark added this to the 0.4 milestone Nov 12, 2022
@whitequark
Copy link
Member

Thanks! I would be happy to review a PR fixing this issue.

@adamgreig
Copy link
Contributor Author

Do you want to revert to the old behaviour or maybe make the environment variable names case-insensitive?

@whitequark
Copy link
Member

make the environment variable names case-insensitive?

I think this would cause issues where you have both AMARANTH_ENV_DIAMOND and AMARANTH_ENV_Diamond, unfortunately :(

The impetus for #687 was to "[allow] Platform.toolchain to contain '+' or '-' characters.". Maybe we can fix just that instead?

adamgreig added a commit to adamgreig/amaranth that referenced this issue Nov 13, 2022
adamgreig added a commit to adamgreig/amaranth that referenced this issue Nov 13, 2022
Accepts previous case for backwards compatibility.

Fixes amaranth-lang#728.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants