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

Stale server environment is propagated when running processes with run #2881

Open
lolgab opened this issue Nov 18, 2023 · 0 comments · May be fixed by #2882
Open

Stale server environment is propagated when running processes with run #2881

lolgab opened this issue Nov 18, 2023 · 0 comments · May be fixed by #2882
Assignees
Labels
bug The issue represents an bug

Comments

@lolgab
Copy link
Member

lolgab commented Nov 18, 2023

Reproduction

// build.sc
import mill._
import mill.scalalib._

object root extends RootModule with ScalaModule {
  def scalaVersion = "3.3.1"
}
// src/main.scala
@main
def run =
  println(s"[app] MY_ENV=${sys.env.get("MY_ENV")}")

Run the following command:

rm -rf out; MY_ENV=hello mill run; mill run

It outputs:

rm -rf out; MY_ENV=hello mill run; mill run
[build.sc] [48/52] compile 
Compiling compiler interface...
[info] compiling 1 Scala source to /Users/lorenzo/scala/repro/out/mill-build/compile.dest/classes ...
[info] done compiling
[35/48] compile 
[info] compiling 1 Scala source to /Users/lorenzo/scala/repro/out/compile.dest/classes ...
[info] done compiling
[48/48] run 
[app] MY_ENV=Some(hello)
[48/48] run 
[app] MY_ENV=Some(hello)

Expectation

The second time it should output [app] MY_ENV=None

@lolgab lolgab added the bug The issue represents an bug label Nov 18, 2023
@lolgab lolgab self-assigned this Nov 18, 2023
lolgab added a commit to lolgab/mill that referenced this issue Nov 18, 2023
@lolgab lolgab linked a pull request Nov 18, 2023 that will close this issue
1 task
@lolgab lolgab added this to the 0.11.6 milestone Nov 18, 2023
lolgab added a commit to com-lihaoyi/os-lib that referenced this issue Nov 18, 2023
@lefou lefou removed this from the 0.11.6 milestone Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue represents an bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants