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

potential bug: nimbledeps incompatibility between nimble versions #1255

Open
AlejandroCabeza opened this issue Aug 7, 2024 · 0 comments
Open

Comments

@AlejandroCabeza
Copy link

Problem

After installing dependencies with one Nimble version and switching to a different Nimble version, the project will not compile.

This situation was detected in two of nim-libp2p's jobs, specifically Windows' Nim1.6.21 and Nim2.0.8 jobs. Randomly, one of these jobs would fail when attempting to run the tests. When compiling, it would fail to find the installed packages.

We traced it to caching: There's one step that will install dependencies in local mode and cache the directory. Because both Windows' jobs share the cache key, all jobs posterior to caching will use the same structure, either Nimble < 0.14.0 (Nim 1.6.21) or Nimble >= 0.14.0 (Nim2.0.8), depending on which stores the directory in the cache.

This led to the hypothesis of incompatible nimbledeps structures, at least in one of the directions. Which one I can't say, because the cache is gone and I couldn't reproduce it locally. Both my Fedora and WSL machines failed to compile when switching Nimble versions; unlike Github, where there was (seemingly) at least one-way compatibility.

We made the runner consistently pass by adding the Nim version to the cache key. While this does not definitively prove the hypothesis, it supports the explanation.

To reproduce

  1. Install dependencies for one Nim version
  2. Run the code. It should work.
  3. Switch to the other Nim version
  4. Run the code. It fails to find libraries.

Expected behaviour

I actually don't know what the expected behaviour is for this. Maybe there's no intention to support this.

Versions

Nim: 1.6.20 and 2.0.8

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

1 participant