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

depends-on search seems broken #911

Open
Philippus opened this issue Feb 27, 2022 · 2 comments
Open

depends-on search seems broken #911

Philippus opened this issue Feb 27, 2022 · 2 comments

Comments

@Philippus
Copy link
Contributor

The 'Artifact dependents' is always empty for me, i.e. https://index.scala-lang.org/search?q=depends-on%3Aakka-actor should give some results.

@adpi2
Copy link
Member

adpi2 commented Feb 28, 2022

Thanks for opening this issue!

We, the Scala Center team, reworked the architecture of the Scaladex backend, and along the way we decided to leave some features behind, included this one. I will be happy to bring it back, but I would like to suggest some changes in the definition of the feature itself.

1. Ambiguity of artifact name

The artifact name alone (akka-actor) is ambiguous because many organizations can use the same. Here probably there is only one organization using akka-actor.

But this table below shows that some artifact names are used by many organizations:

image

So the artifact name alone is not enough: we should also have the group_id:

depends-on:com.typesafe.akka:akka-actor

2. Searching for projects or artifacts

Here it seems you want to find all projects that have at least one artifact that depends on another artifact whose name is akka-actor. So the criteria is artifact_deps as defined below.

image

Alternatively it could be project_deps: find all projects that depends on another project (at least one artifact of project A depends on at least one artifact of project B).

To distinguish between the two we should call the parameters depends-on-artifact and depends-on-project. Of course depends-on-artifact is more precise but I would rather implement depends-on-project first as we are searching for projects.

Your example would become depends-on-project:akka/akka and it would give more results.

3. HTTP query parameter

I also suggest we use HTTP query parameters rather than the search query. They are easier to document and to type-check in the code.

Finally the request would be:

https://index.scala-lang.org/search?q=*&depends-on-project=akka/akka

Or

https://index.scala-lang.org/search?q=*&depends-on-artifact=com.typesafe.akka:akka-actor

@Philippus
Copy link
Contributor Author

If it is not supported anymore we can/should remove the "Artifact Dependents"-link on the detail page of projects.

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

No branches or pull requests

2 participants