env-vars ignored under exec
Open
Nobody has claimed this yet.
build
cli
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
Expected Behavior
manual says env-vars apply under exec/build but don't appear to.
Actual Behavior
env-vars are not set.
Reproduction
dune file:
(env
(_
(env-vars (XYZ 10))
))
(executable
(name envar)
)
src file:
let _=
try
let v= Sys.getenv "XYZ" in
print_endline@@"ENV: "^v
with _->
print_endline "not found"
running [dune exec ./envar.exe] gets 'not found'.
- PR with a reproducing test:
- as per the example given
Specifications
- Version of
dune(output ofdune --version): 2.5.1 - Version of
ocaml(output ofocamlc --version) 4.07.1 - Operating system (distribution and version): ubuntu x86-64
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided dune file and OCaml source, then run the reproduction with dune exec ./envar.exe on the stated Dune and OCaml versions. Check the env-vars behavior under exec and add a reproducing regression test following the testing guidance in HACKING.md. Done means XYZ is available to the executable and the test verifies it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100