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

Wrong stubs are used when opam sources are embedded in a dune workspace #4726

Open
emillon opened this issue Jun 23, 2021 · 1 comment · May be fixed by #4777
Open

Wrong stubs are used when opam sources are embedded in a dune workspace #4726

emillon opened this issue Jun 23, 2021 · 1 comment · May be fixed by #4777

Comments

@emillon
Copy link
Contributor

emillon commented Jun 23, 2021

Hi,

We're using the opam libraries in a project. These libraries are not installed through opam, they are vendored within a dune workspace. The resulting binary fails at runtime on Windows with:

           (Failure "Windows only. This function isn't implemented.")
           Raised at Stdlib.failwith in file "stdlib.ml", line 29, characters 17-33
           Called from OpamStd.OpamSys.system in file "duniverse/opam/src/core/opamStd.ml" (inlined), line 850, characters 15-54
           Called from OpamProcess.cygwin_create_process_env.f in file "duniverse/opam/src/core/opamProcess.ml", line 159, characters 37-60
           Called from OpamStd.OpamList.filter_map.loop in file "duniverse/opam/src/core/opamStd.ml", line 129, characters 14-17
           Called from OpamProcess.cygwin_create_process_env in file "duniverse/opam/src/core/opamProcess.ml", line 183, characters 12-41

My understanding is that opamStubs.ml.dummy are selected because the fallback rules are triggering. I think that this does not happen in the "usual" build route because of what happens with ./configure but I'm curious to see if opam can support this use case better (the fallback behaviour could be to let dune detect the OS, for example).

Thanks!

@dra27
Copy link
Member

dra27 commented Jun 23, 2021

I should have a look at the current state of enabled_if support in Dune - the fallback files were added precisely to allow this kind of use to work on Linux so it's time to have a better look at Windows.

@dra27 dra27 self-assigned this Jul 2, 2021
@dra27 dra27 added this to To do in Opam 2.2.0 via automation Jul 2, 2021
@dra27 dra27 linked a pull request Jul 29, 2021 that will close this issue
@dra27 dra27 moved this from To do to In progress in Opam 2.2.0 Jul 29, 2021
@rjbou rjbou added this to the 2.2.0~alpha milestone Nov 16, 2021
@dra27 dra27 removed this from the 2.2.0~alpha milestone Jan 23, 2023
@dra27 dra27 moved this from In progress to After ~alpha; before release in Opam 2.2.0 Jan 23, 2023
@kit-ty-kate kit-ty-kate moved this from After ~alpha; before release to For RC in Opam 2.2.0 Jul 31, 2023
@kit-ty-kate kit-ty-kate removed this from For RC in Opam 2.2.0 Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants