scalacenter / scaladex

The Scala Package Index
https://index.scala-lang.org
BSD 3-Clause "New" or "Revised" License
198 stars 76 forks source link

[Bug] API Cleanup broke compatibility with some tools #1474

Closed carlosedp closed 1 month ago

carlosedp commented 1 month ago

Current behavior

I had a script which used Scala Index API to check for Mill/Ammonite plugin versions and show updates.

I used something like https://index.scala-lang.org/api/artifacts/com.goyeau/mill-scalafix_mill0.11_2.13 in the API but it's giving 404 now:

Exception in thread "main" requests.RequestFailedException: Request to https://index.scala-lang.org/api/artifacts/com.goyeau/mill-scalafix_mill0.11_2.13 failed with status code 404
The requested resource could not be found.
    at requests.Requester$$anon$1.readBytesThrough(Requester.scala:398)

Is it possible to add it back?

Expected Behavior

Return artifact versions on /api/artifacts API.

Extra comments

No response

Search terms

No response

adpi2 commented 1 month ago

Thanks for the report. I am not yet sure if I want to add it back, but I'll think about a replacement.

Something like this maybe: api/artifacts/com.goyeau/mill-scalafix?platform=mill0.11&language=2.13

adpi2 commented 1 month ago

I created https://github.com/scalacenter/scaladex/issues/1482 with a description of the complete API I would like to implement. It contains the endpoint your tool has been using.

carlosedp commented 1 month ago

Thanks! That's awesome.