Skip to content

Fetch only tags within the range#1349

Merged
jmgomez merged 1 commit intonim-lang:masterfrom
2-towns:fetch-tags-within-range-only
Feb 25, 2025
Merged

Fetch only tags within the range#1349
jmgomez merged 1 commit intonim-lang:masterfrom
2-towns:fetch-tags-within-range-only

Conversation

@2-towns
Copy link
Copy Markdown
Contributor

@2-towns 2-towns commented Feb 17, 2025

This PR restricts the fetched maxTaggedVersions to those that match the constraints defined in the Nimble file.

Explanation:

When installing, Nimble retrieves the maxTaggedVersions (default: 4) tags from each dependency, but it does not consider the version constraints specified in the Nimble file. For example, consider the repository: : https://github.com/codex-storage/nim-ethers.

When we attempt to install the dependencies using the following command:

nimble install

The installation process ends with an error:

Error: Downloaded package's version does not satisfy requested version range: wanted >= 0.5.4 & < 0.6.0 got 0.6.2..

This error occurs because one of our dependencies, contractabi requires "nimcrypto >= 0.5.4 & < 0.6.0" for version 0.5.0, which is one of our last four tags.

The issue is that contractabi version 0.5.0 should not be retrieved, as it does not match our new requirement in nim-ethers: "contractabi >= 0.7.0 & < 0.8.0".

This PR addresses this issue by retrieving the last maxTaggedVersions only if they match the specified version constraints.

Note: Our current workaround is to set maxTaggedVersions to 2.

@2-towns 2-towns marked this pull request as ready for review February 17, 2025 16:24
@jmgomez jmgomez merged commit afd9298 into nim-lang:master Feb 25, 2025
11 checks passed
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

Successfully merging this pull request may close these issues.

2 participants