conan-io / conan-io/docs

[question] Looking for most recent requirement's package with version ranges

Open
#3,877 3 comments 0 reactions 1 assignee Claimed by @memsharded View on GitHub
type: question
Dominant language
C++
Stars
125
Forks
382
Avg merge
22h 39m
Merged PRs (30d)
21

Description

### What is your question?

Hi,

Let's consider a requirement using a _version range_, for example `module/[~4]`.

When Conan installs the requirement for a given _profile_, for instance doing something like this:
```bash
$ conan install -u --requires=module/[~4] -pr=profile
```
it will download _recipe_ and _package_ for the requested _profile_ of the most recent version `4.*.*` of _module_ found on a remote (if it isn't in cache yet).
This happens despite some less recent version `4.*.*` already present in cache because of the `-u` argument.
If only the recipe of the most recent version is found, but no package, Conan returns with an error:
```bash
ERROR: Missing prebuilt package for 'module/4(...)'
```
which is something expected when no `--build=missing` or similar is given.

First question is of course if I understood correctly.

And now the actual (hopefully not too weird) question:
Is there a way to tell Conan to look for the most recent module's version whose binary package for a certain profile is available too?
In other words, if only the recipe of, say, version 4.8.0 is available on a remote, while an older (unknown by us) version, say 4.7.1, has the binaries too, can we tell Conan to get the requested binaries of 4.7.1 from the remote instead of trying 4.8.0 and rise an error?

TIA and kind regards.

### Have you read the CONTRIBUTING guide?

- [ ] I've read the CONTRIBUTING guide

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.