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

luv_unix not buildable with esy (dependency issue) #110

Closed
zbaylin opened this issue May 4, 2021 · 5 comments
Closed

luv_unix not buildable with esy (dependency issue) #110

zbaylin opened this issue May 4, 2021 · 5 comments

Comments

@zbaylin
Copy link

zbaylin commented May 4, 2021

Hey @aantron -- just one more issue I found with luv_unix :)

OS: macOS 11 (Big Sur)

esy version: 0.6.10

Problem: If I put both luv and luv_unix in my package.json like so:

  "dependencies": {
    ...
    "@opam/luv": "aantron/luv:luv.opam#decdaad",
    "@opam/luv_unix": "aantron/luv:luv_unix.opam#decdaad",
    ...
  }

building luv_unix fails with the following message:

    File "src/unix/luv_unix.ml", line 22, characters 9-50:
    22 |       if C.Functions.Os_fd.is_invalid_handle_value os_fd then
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error: Unbound value C.Functions.Os_fd.is_invalid_handle_value
    error: command failed: 'dune' 'build' '-p' 'luv_unix' '-j' '4' (exited with 1)

It seems to be because luv_unix is being built before luv, but I don't know how to enforce the order (i.e. make esy know that luv_unix depends on luv being built first)

@zbaylin zbaylin changed the title luv_unix not buildable with esy luv_unix not buildable with esy (dependency issue) May 4, 2021
@aantron
Copy link
Owner

aantron commented May 4, 2021

The order should already be forced by this line:

"luv"

have you positively confirmed that they are being built out of order?

I can't seem to eyeball this issue. To rule out inherent problems with luv_unix, are you able to build luv_unix in a development checkout of the Luv repo (i.e. outside esy)?

@zbaylin
Copy link
Author

zbaylin commented May 4, 2021

I can't seem to eyeball this issue. To rule out inherent problems with luv_unix, are you able to build luv_unix in a development checkout of the Luv repo (i.e. outside esy)?

I am, that's actually how I discovered #108 :)

have you positively confirmed that they are being built out of order?

As far as I can tell I have -- I deleted all builds of luv and luv_unix, and when I run esy build, I get

info esy build 0.6.10 (using package.json)
info building @opam/luv_unix@github:aantron/luv:luv_unix.opam#decdaad@d41d8cd9

which seems to indicate that luv_unix is being built before luv

This seems like it might be an esy problem rather than an luv or opam one, but I'm not 100% sure of that

@aantron
Copy link
Owner

aantron commented May 5, 2021

info esy build 0.6.10 (using package.json)
info building @opam/luv_unix@github:aantron/luv:luv_unix.opam#decdaad@d41d8cd9

Is there build output for @opam/luv? If not, it may be because it is cached. In light of that, this paste alone doesn't explicitly show the order. What does it mean that you have deleted all builds? Have you also deleted ~/.esy? If so, can you confirm and/or show the full build output, with the positions of @opam/luv and @opam/luv_unix included? AFAIK if you had actually deleted all cached builds, you would see much more than this after info esy build.

@zbaylin
Copy link
Author

zbaylin commented May 5, 2021

Ah you're right, it looks like I missed one of the cached builds.

I figured out what it was -- luv_unix was requesting luv 0.5.7 from OPAM, which didn't have the function definition. If I move the packages to resolutions, it works, i.e.:

  "resolutions": {
    "@opam/luv": "aantron/luv:luv.opam#decdaad",
    "@opam/luv_unix": "aantron/luv:luv_unix.opam#decdaad"
  }

Sorry for the confusion!

@zbaylin zbaylin closed this as completed May 5, 2021
@aantron
Copy link
Owner

aantron commented May 5, 2021

That's inconvenient. I would have hoped esy would build a consistent set of packages. I'll have to note this for future instructions, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants