-
Notifications
You must be signed in to change notification settings - Fork 989
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
[feature] Add "Best Matches" Binary Search Mode #6770
Comments
Hello @solvingj, that summs it up nicely. yes. as I've further said in my comment: #6364 (comment) I was thinking at the time that I will be raising similar request to this, however I had a change of heart. Let me elaborate. Short story long: Because to do this matching you need to know exactly what sort of package you are searching for, as the specified package layout will be affected by the upstream dependencies for it. I think this is more or less possible with the addition of ##6700 with next release of conan, as previously the output of What I am planning to without any conan modification - and this is probably what would have ot be implemented by this request is to: Extract the set of classifiers that were expected for particular library so these: And then having the classifiers values from the Since I think this is doable starting with conan 1.24.0 I decided not to raise a feature at this time, and try to implement this for ourselves, possibly after we have done this I would come back to the community. If I am correct then I dont think this would be that difficult. |
The way I envision a possible approach:
What do you think? |
RE: comments from @fulara ..
I agree this is a desirable building block. I would probably name it Also, "Best Match" isn't actually a good description of what I wanted from the feature. Rather, the crucial part of what I wanted was the list of binaries to be sorted by the "number of diffs". "Best matches" (binaries with only 1 setting or option difference) would naturally be at the top (if they existed). From my usage, it's almost always the case that I'm building with 1-option-different than what was prebuilt. I should add that actually, there might be binaries with NO differences in settings/options, but only in direct dependency list or version. I would consider these better matches, and list them above 1-difference dependencies. Finally, I agree with the additional convenience feature of automatically running this search and printing the results upon failed RE: comments from @memsharded I think maybe it seems overwhelming and difficult to imagine because we've been talking about an abstract concept of "distance", which leaves a lot of details open to interpretation and implementation. Lots of room for debate about preferences of weight among the various settings and options, etc. In reality, I don't think we want something that abstract. @fulara and I seem to have come to same/similar/compatible conclusions about what a practical UX and reasonable implementation would look like. If there's no barrier to the So I guess the question is: have the roadmap/discussions for the future of search command(s) included anything like the suggested |
Implemented in #14694 |
This feature request was already somewhat outlined by @fulara in this other ticket, as a possible concept:
#6364 (comment)
This is a very old problem. From a user experience perspective, the common scenario is that we know that there are a bunch of binaries are built for some dependency, and we're pretty sure this includes the one we want. But, when we run Conan we get an error that there's no binary built with the specific package ID hash requested. The existing search has improved over the years to print out the information about the requested package ID hash so that users could deduce the mismatch.
The "problem" is that this is very onerous, tedious, and time-consuming a lot of the time. It relies on the user to perform a visual comparison setting-by-setting, option-by-option, between the error message and EACH search result in the list of search results to HOPEFULLY see the problem. Alternatively, users can manually construct a query for the
conan search -q
which contains all the settings they're trying to use. This reduces the comparison to just looking at all the different options and values. Furthermore, if the difference inpackage_id
is related to the list of dependencies, it's very hard to see it, especially for newcomers.Matching binary package ID's is central to Conan's functionality, and this situation comes up frequently enough that it feels like a big hole in the UX overall.
The suggestion in the aforementioned ticket is a sound strategy for providing a new search feature that improves the UX around this. From a search perspective, each binary is effectively describable by it's matrix of options, settings, and dependencies (pre-hash). The suggested conan search feature is effectively to do a matrix comparison against the requested but unhashed values and the unhashed values of the binaries in the available repositories. Conan would then need to use some sort of scoring/distinace/best match algorithm and then present to the user a list of results in order of "best score/best match" first. For each result, the output should display the "DIFF" with the requested binary so users can easily see what's different.
Logically, this is reasonable. Based on how the Conan dependency tree graph is calculated, dynamic options and settings are reconciled, and then everything is factored into the
package_id
.... the implementation of this might be very difficult. In any case, I think it's fair to say that "best match" search is reasonable, and would be very useful here. I will try to do some research into established "Matrix comparison" methods with best match and diff functionality.The text was updated successfully, but these errors were encountered: