dune exec needs to add .exe on Windows
Open
Nobody has claimed this yet.
windows
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 287
Description
dune exec -- foo on Windows needs to consider dune exec -- foo.exe when working out if there is a program to (re)compile. At the moment, the behaviour is mixed:
- if
_build/install/default/bin/foo.exehas previously been built, then you get a potentially stale execution offooif its sources have changed - if
_build/install/default/bin/foo.exehasn't previously been built, then you get an error.
Specifying dune exec -- foo.exe works consistently, but this has two problems:
- It's surprising on Windows (unless the user has done something really weird with the
PATHEXTenvironment variable) - It's not good for a cross-platform set-up since
dune exec -- foo.exewill fail on a (Unix) system which installsfoo.exeasfoowith the executable bit set.
(Dune 2.4.0; Windows mingw32; OCaml 4.08.1)
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 at the dune exec command path and reproduce the reported Windows behavior with foo and foo.exe. Trace how the executable is located and how source changes trigger rebuilding; it is done when dune exec -- foo consistently handles the Windows .exe name without breaking the corresponding Unix setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100