Stream: Dune devs & users

Topic: env cleaning?


view this post on Zulip Gaëtan Gilbert (Mar 31 2022 at 10:51):

Does dune 3 do some env variable removal? It seems to be removing INSIDE_EMACS when using dune exec -- dev/dune-dbg

view this post on Zulip Emilio Jesús Gallego Arias (Mar 31 2022 at 10:54):

I don't know, but yes, it can mess with the env sometimes. But I'm suprised. Maybe it is tracking that var in some deps field?

view this post on Zulip Emilio Jesús Gallego Arias (Mar 31 2022 at 10:55):

Yes

view this post on Zulip Emilio Jesús Gallego Arias (Mar 31 2022 at 10:55):

     (* To improve reproducibility, we don't let command executed by Dune
        observe whether Dune is run inside emacs or not. One such program that
        behave differently when run inside emacs is Dune itself and we sometimes
        run Dune from inside Dune, for instance in cram tests, so it is
        important to do this. *)
     Env.remove env ~var:"INSIDE_EMACS")

view this post on Zulip Emilio Jesús Gallego Arias (Mar 31 2022 at 10:56):

https://github.com/ocaml/dune/pull/4680

view this post on Zulip Rudi Grinberg (Mar 31 2022 at 15:42):

This does seem a bit problematic. I wonder if this variable is something we should only scrub for dune's tests.


Last updated: Jan 30 2023 at 18:04 UTC