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

Set forkEnv to an empty Map #3442

Merged
merged 1 commit into from
Sep 1, 2024
Merged

Conversation

lolgab
Copy link
Member

@lolgab lolgab commented Aug 31, 2024

Since os-lib propagates the system environment by default when it runs subprocesses, setting forkEnv to the system environment, is redundant, but also confusing, since removing a key from the Map doesn't stop mill to pass the environment variable to the run program. This sets a new default, which is a semantic breaking change, so it should go in Mill 0.12.0, which is a binary compatible but behavior incompatible release.

Pull Request: #3442

@lihaoyi
Copy link
Member

lihaoyi commented Sep 1, 2024

What user-visible effect does this have?

@lolgab
Copy link
Member Author

lolgab commented Sep 1, 2024

What user-visible effect does this have?

It doesn't make run much different, since it's a T.command so it runs again every time.
I can see a change in behavior if a user used it as a T.input to get the environment, because now it's a fixed T {} of an empty map, but that's not the "correct" use of this target. It is still safe to change it in 0.12.0 but it doesn't seem visible in the "normal" use case.

Since os-lib propagates the system environment by default when it runs
subprocesses, setting `forkEnv` to the system environment, is redundant,
but also confusing, since removing a key from the Map doesn't stop mill
to pass the environment variable to the run program.
This sets a new default, which is a semantic breaking change, so it should
go in Mill 0.12.0, which is a binary compatible but behavior incompatible
release.
@lolgab lolgab marked this pull request as ready for review September 1, 2024 11:18
@lihaoyi
Copy link
Member

lihaoyi commented Sep 1, 2024

Sounds good!

@lolgab lolgab merged commit 2461260 into com-lihaoyi:main Sep 1, 2024
33 checks passed
@lolgab lolgab deleted the forkEnv-empty branch September 1, 2024 14:15
@lolgab lolgab added this to the 0.12.0 milestone Sep 1, 2024
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