-
Notifications
You must be signed in to change notification settings - Fork 23
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
"MCS ran into an error: failure: failure: failure: failure: failure: failure: failure:" while searching for a class with 2500 results limit. #394
Comments
First diagnosis: at some point, the search API offered by Maven Central returns an HTML page with a generic HTTP 504 (Gateway timeout) message, rather than a JSON response: <html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
</body>
</html> I think MCS could improve in two ways:
|
Thank you @mthmulders ! And thanks for adding those enhancement issues - really nice to see it's an active project and you take care of it. I just thought about something a bit related: would it make sense to have an option to only include the latest version of found dependency? Does Maven API support that? That way number of results can be drastically reduced and usability would increase a lot. For example, a class might exist in multiple versions of a dependency, starting from 1.0, hence the search would return all those hundreds of results per single dependency. But if there was a flag to tell "I care only about the latest" - that would be always one per dependency and the list would be much shorter. Worst case, if Maven doesn't support that - results can be requested in chunks (known to not cause this issue for Maven), then arranged by name and version and then latest versions returned. Considering Maven naming convention, this should be doable. I might even try to contribute if Maven does not support that :) |
To elaborate a bit more: when you specify a limit above 200 (constant defined here, in accordance with the remote API never returning more than 200 items per request), MCS will iterate until it has retrieved all items that match the query or retrieved the number of items you have requested - whichever comes first. The aforementioned HTML response consistently appears when MCS asks for items 1200 to 1400 in your query. |
You're welcome, and thanks for the nice words!
That's an interesting feature to consider! Often, you don't care for the gazillion of older versions that are around :-). Would you be so kind to open a new issue for this idea? |
|
First of all, thank you for a great tool. For some reason I did not find any other way to search Maven repo by full class name (various websites don't work), so it's very useful!
I just built the latest snapshot of MCS (0.7.1) and tried to run the following search:
and got the following error:
I must admit that running it with default number of results worked fine:
resulted in:
Thank you.
The text was updated successfully, but these errors were encountered: