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

No way to query existence of package on remote using profiles #5431

Closed
3 tasks done
tmwa opened this issue Jul 2, 2019 · 5 comments · Fixed by #15697
Closed
3 tasks done

No way to query existence of package on remote using profiles #5431

tmwa opened this issue Jul 2, 2019 · 5 comments · Fixed by #15697

Comments

@tmwa
Copy link
Contributor

tmwa commented Jul 2, 2019

I would like to be able to check whether a binary package for a particular set of settings and options exists on a remote.
As of Conan 1.16.1 there is no way to do this. There are two approaches that almost work:

conan install -r remote Package/1.0.0@user/channel -pr profileA -pr profile B
  • Settings and options can be specified through profiles (good)
  • Exit code is nonzero if binary package doesn't exist on remote (good)
  • Binary package has to actually be downloaded; there is no flag such as --dry-run which would simply report if it exists
conan search -r remote Package/1.0.0@user/channel --query "os=Linux AND compiler=gcc AND compiler.version=5 AND option1=True AND option2=CustomValue
  • Does not support settings and options from profiles; all this information has to be replicated in the query syntax, which is cumbersome
  • Exit code is always 0, even if no packages matching the query are found
  • I've read the CONTRIBUTING guide.
  • I've specified the Conan version, operating system version and any tool that can be relevant.
  • I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.
@memsharded
Copy link
Member

Also, a close alternative to install would be info which in theory it is a install that does not actually install binaries, so it would be equivalent to dry-run functionality.

So:

conan info boost/1.69.0@conan/stable -r=conan-center -s compiler=qcc -s compiler.libcxx=gpp -s compiler.version=4.4
boost/1.69.0@conan/stable
    ID: 5c1390cbdb5a2bbbd9562d0dbe8333a3234205d6
    ...
    Binary: Missing

Will produce an output telling that the binary is missing, but yes, it will return 0, not an error.

Same with --json would produce a machine readable json with {"build_id": null, "binary": "Missing" field.

I think this is a reasonable use case, and we need to think of some UI if possible to simplify access to this information.

@memsharded
Copy link
Member

First step should be investigating and discussing what would be the best UI for this use case.

@AbrilRBS
Copy link
Member

AbrilRBS commented Feb 9, 2024

Closing as solved in Conan v2. The conan list command is able to list packages for the passed profiles, conan graph info, which is able to report the whole status of the dependency graph for one or multiple references for the passed profiles, and conan graph explain, which is able to print information regarding the reasons why a certain binary is missing :)

@AbrilRBS AbrilRBS closed this as completed Feb 9, 2024
@AbrilRBS
Copy link
Member

AbrilRBS commented Feb 9, 2024

Reopening to track progress for adding profile passing for conan list, which turns out I was misremembering with internal development progress, and does not have profile inputs (yet!). Thanks @memsharded for heads-up :)

@AbrilRBS AbrilRBS reopened this Feb 9, 2024
@AbrilRBS AbrilRBS added this to the 2.2 milestone Feb 9, 2024
@memsharded memsharded self-assigned this Feb 19, 2024
@memsharded
Copy link
Member

Closed by #15697, the --filter-profile, --filter-settings and --filter-options will be available in Conan 2.2 to conan list

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

Successfully merging a pull request may close this issue.

3 participants