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

SAT resolution failure #1277

Closed
AlejandroCabeza opened this issue Oct 18, 2024 · 2 comments · Fixed by #1279
Closed

SAT resolution failure #1277

AlejandroCabeza opened this issue Oct 18, 2024 · 2 comments · Fixed by #1279

Comments

@AlejandroCabeza
Copy link

In the nim-libp2p repository, dependency resolution is failing when using the SAT dependency solver.

These are the scenarios:

  1. nimble --solver:legacy install
    • Works
  2. nimble --solver:sat install
    • Fails
  3. nimble install_pinned (a custom mechanism that installs fixed versions from a .pinned file into a local nimbledeps directory, which is recreated each time it's run)
    • The outcome varies depending on how it's run:
      a) When run with legacy (nimble --solver:legacy install_pinned), it works.
      b) When run with SAT (nimble --solver:sat install_pinned), it fails.
      c) Interestingly, if you first run it with legacy and then run nimble --solver:sat check, the check passes.

At first I thought this was due to SAT not being able to resolve the dependencies in libp2p.nimble, but scenario 3c made me think that's not quite it.

I'm not sure anymore if this happens because our dependencies are actually unsolvable or there's a situation SAT just can't handle. Any ideas?

Araq added a commit that referenced this issue Oct 30, 2024
…en matched against another tag (#1279)

* Tagged versions (i.e. #head) behaves like `any` except when matched against another tag

* Updates changelog (#1276)

* Updates changelog

* Apply suggestions from code review

---------

Co-authored-by: Andreas Rumpf <[email protected]>

* bumps `setup-nim-action` (#1280)

* bumps `setup-nim-action`

* moves to stable (devel is not supported by `setup-nim-action@v2`)

* adds `displayUsingUnderspecifiedVersionWarning`

* fixes ci compile error

---------

Co-authored-by: Andreas Rumpf <[email protected]>
@2-towns
Copy link

2-towns commented Dec 2, 2024

I still have similar issue with 0.16.3.

In my .nimble file, I have a dependency to libp2p:

requires "libp2p >= 1.7.0"

When I run nimble install

I have this error:

.nimble/pkgcache/githubcom_ba0f3dnsclientnim_0.3.4/src/dnsclient.nim(1, 2) Error: cannot open file: ""
       Tip: 673 messages have been suppressed, use --verbose to show them.
nimble.nim(840)          install

    Error:  Aborting installation due to build failure.

But when i run nimble --solver:legacy install it works.

@jmgomez
Copy link
Collaborator

jmgomez commented Dec 2, 2024

@2-towns fixed here: #1297
There is even a test case for libp2p in that PR

cc @arnetheduck

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