-
Notifications
You must be signed in to change notification settings - Fork 993
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
enable query for a package / profile combination, local and/or remote #6842
Comments
Hi @a4z The problem is that there is no 1:1 match between profiles and package-ids. There are many things that affect the computation of a package-id, from the recipe What we are doing to alleviate the problem of missing binaries is improving the html output table of the This is already being implemented in #6832 |
this is not the same |
Build-requirements do NOT affect at all to the package-id. You can add them, remove them, change the version, and still the final package ID is the same, so it will not tell you if you need to build that package or not. There are plans to change this, but at the moment, it behaves this way. |
ok, then something different
but the profile has more, especially the c++ standard
any chance this will be added in the output? |
The above packages do not show This is a search that you can do today with the The functionality being implemented will be more intuitive and will allow debugging, because you can start filtering by OS, compiler, etc, and narrow the search, and then realize that the discrepancy of the Another separate issue is the current treatment of But the functionality requested will better be addressed with this html search and filtering. As a perfect match or a very good distance measure can't be easily defined, because of this lack of 1:1 correspondence, it is much better to provide some useful "debugging" functionality instead, and this is our plan. |
so the best I can do is take a profile, translate it to a query string , and use this for conan serach. this does not seem to help me for e.g. automation of some things because this means, if I change the cppstandard from 14 to 17, zlib. openssl, .. would not needed to be rebuilt, but other packages that make use of the property do. and this might also be the case for other settings I do in profiles. a related question, is it possible to get a package id of a package with a profile without building it ? some more context, I have due to cross compiling and host + target confige 4 + 4 + 4 + 4 + 2 + 2 + 2 builds for each of my packages |
In my opinion, the table solution is a bad UX. It's multistep and pain with cli. |
This is a small UX improvement, and most likely not enough. Finding this is as "easy" as doing the above query, converting the profile to a What makes sense is to take the output of the "package missing" exception error, and start filtering all the binaries for that package based on that values. There is no single universal approach to find what is happening, sometimes it might be an option, sometimes it might be the version of a requirement that affects the package_id. The only way to have something remotely useful is to allow users to filter, order and "debug" what is happening in an interactive and visual way. |
Hi @a4z
At least from our experience with many other users this might not be the optimal way to think about this problem. When CI kicks in, first you have the cache empty. You cannot use the same cache for different CI jobs, because the Conan cache is not concurrent. So caches are populated from scratch when you start working. It is not that you have a package in the local cache for that profile. Also, you only build when code changes, and when there are new things to build. Not having binaries is an error in the pipeline, and CI jobs shouldn't be building binaries other than the one that is changing the source code. This is the reason Conan fails by default when binaries are missing, instead of The "why this binary is missing" shouldn't be part of the automated CI. This should only happen if something goes wrong, and then you need human intervention to investigate why. The tools we are implementing for this are aimed for this use case, not for automation.
If you are creating new profiles to build your products with, that typically involves launching a "products" build, that specifically takes this new profile and launches a build for packages to create binaries for them. This is the same logic, lets say, as if you depend on boost, and you plan to use a new boost version. You don't implement the logic of "I check if the new version package is there, and if not, I create it". If someone requires the new version of boost, and that package is not already existing there, it is an error. The package should be created first. Otherwise, it is very easy to have different process to be building in parallel and uploading simultaneously boost (probably causing different package revisions unnecessarily). The same logic should be applied for binaries for different configurations. |
you are talking about CI, parallel build and upload, but not about the developer who creates such things and who might have restricted resources. I have a list of 15 packages, then I might rebuild everything in order that needs to be build new with the new profiles once this works for me on my limited machine, I put it into CI system which has also not endless resources available, so it does not spend useless time in building packages that do not need to be rebuild, and block resources other are waiting for. this is my mental picture at the moment how it should work for me in my situation and yes, I know about --build=missing, but this will not give me the list that I would like to have. but what I understand it the following, so I will start writing queries for the list of packages I have, with the internal knowledge I have, producing something that works for me, because this might be faster than discussing usecases here. |
Yes, that is partially true. I definitely know how to add the above
There are mechanisms in Conan to do that probably way better than with searches. Basically:
Have you had a look at those commands? I think they can be useful for your use case. I am not here to argue to avoid doing things, I am really trying to help. |
this means, I would need to add a temp/fake consumer project, consuming the packages I build I can have a look at that, this basically falls under the work around way, but if it is not too complex and allows me to extract the info I need more easy than currently, I can give it a trial |
The Otherwise you would need to encode somewhere the full dependency graph to be able to iterate the packages in the right order. If the graph grows too large, or it is dynamic, this can be cumbersome and error prone. We call it the "products" approach. You could have different Let me know how it goes with this approach. Thanks! |
finally had time to explore the graph command. This is for sure some help, even if I do not understand why it is so hard to get a package id for a profile + package combination. so what about adding a command
the id is used to identify packages and also for some functionality, like conan upload ... , conan and with the id I can have my search workaround more easy then now :-) |
I am not sure why this is now closed, can I get now the package id, or cache location, via some command ?
and if it exists local
is this now all the sudden possible? through an improved HTML output ? |
the new |
I would like to be able to query if a package for a given profile (and option set) exists in the local cache, or remote, or if it would be needed to be built.
Currently I can do this for the local cache via some complex workarounds, but it should be simple doable via
conan search -pr profilename package/name@
+ remote option if remote search is wanted.optimally, this should return something usable also from helper scriptes
The text was updated successfully, but these errors were encountered: