scaladex icon indicating copy to clipboard operation
scaladex copied to clipboard

Clarification of "Dependents", "Dependencies", and "Artifact Dependents"

Open adamvoss opened this issue 8 years ago • 10 comments

Dependents, Dependencies, Artifact Dependents Perhaps these are the established terms, well understood by those in the know, and there is nothing that can be done about non-intuitive behavior. However, as is, it is the changing frames of reference make Scaladex and even individual pages within it confusing as I will try to show below using akka-actor as an example.

image

Statistics shows 14 Dependents The Dependents box shows 13 Dependents

  • Unless there is an unrelated bug here, Dependents means two different things on the same page. I don't know what the difference is to know how to remedy this aspect.

  • If I click on the "Artifact Dependents" link I am taken to a Scaladex search for "dependencies:akka/akka-actor". I thought I was looking for "dependents" but now am searching for "dependencies" which is surprising. After some thought, the user may realize they just changed frames of reference and now they are looking for things where dependencies contains akka/akka-actor rather than things that depend on akka/akka-actor. From a technical perspective, this makes sense and they are clearly equivalent, but from a user perspective it can be confusing. If "depends-on:akka/akka-actor" would be an options instead of "dependencies:akka/akka-actor" that is the best alternative I have thought of.

  • I can understand Artifact Dependents as everything that depends "akka-actor", but then I am left not knowing what Dependents is. It is not a proper subset of Artifact Dependents. Unless told otherwise, I will assume who have worked with on large projects understand the distinction.

adamvoss avatar Dec 30 '16 01:12 adamvoss

We use dependent to denote the opposite of dependencies. We could also use reverse dependencies.

Unless there is an unrelated bug here, Dependents means two different things on the same page. I don't know what the difference is to know how to remedy this aspect.

They should be equal.

depends-on:akka/akka-actor" would be an options instead of "dependencies:akka/akka-actor"

This could work too. Good idea.

MasseGuillaume avatar Dec 30 '16 10:12 MasseGuillaume

Statistics shows 14 Dependents The Dependents box shows 13 Dependents

Tracked this part down. The difference is because the lower filters out duplicates and in the case of akka-actor the following dependencies are in the Seq

ScalaDependency(Reference(hseeberger,akka-log4j,akka-log4j, 1.2.2,Some(ScalaTarget(2.12,None))),Some(compile)), ScalaDependency(Reference(hseeberger,akka-log4j,akka-log4j, 1.2.1,Some(ScalaTarget(2.12,None))),Some(compile))

~~I imagine cases such as the above can only happen because of transitivity? A depends on B and Y(v1.2). B depends on Y(v1.1). Thus, A also depends on Y(v1.1).~~

~~Is there any way to trace these dependencies back to their origin or reconstruct the dependency tree?~~

Edit: disregard. I forgot I was looking at dependants not dependencies. Purely my bad for not reviewing before posting.

adamvoss avatar Jan 03 '17 02:01 adamvoss

Thanks for the explainations.

They should be equal.

Fixed.

depends-on:akka/akka-actor" would be an options instead of "dependencies:akka/akka-actor"

This could work too. Good idea.

I have an implementation for this. I'd rather not unnecessarily pollute the number of search keywords. If anyone has a better idea than "depends-on:" I would happily change the name now rather than it possibly changing in the future and both needing to be supported. "uses:"? "dependent-of:"?

I can understand Artifact Dependents as everything that depends "akka-actor", but then I am left not knowing what Dependents is. It is not a proper subset of Artifact Dependents. Unless told otherwise, I will assume who have worked with on large projects understand the distinction.

Can I get a hint on this one? My searching has turned up pretty empty and I find that with my local changes for the other two aspects erroneous conflation of distinction becomes more likely.

adamvoss avatar Jan 03 '17 18:01 adamvoss

There still appears to be some problem here. In better-files, there is one dependent listed, but when I click on "Artifact Dependents", I get a completely different result.

larsrh avatar Jan 15 '17 08:01 larsrh

@larsrh the default release is "com.github.pathikrit" %% "better-files-akka" % "2.16.0" this is what you see on the right sidebar. The dependent section is about this release. If you click Artifact Dependents you see the dependent for "com.github.pathikrit" %% "better-files-akka" for all versions.

I think since I have to explain this, it shows that the UI can be improved and something is not clear.

I think what you intended to do is select the better-files artifact and look for it's dependent: https://scaladex.scala-lang.org/search?q=depends-on:pathikrit/better-files

MasseGuillaume avatar Jan 15 '17 13:01 MasseGuillaume

Alright, I think I have have it figured out from what you said above.

The dependents box on an Artifacts Page shows all dependent artifacts of the currently selected version of the artifact. The "depends-on" search (Artifact Dependencies) shows all dependent projects of any version of the artifact?

Do I have that correct?

adamvoss avatar Jan 15 '17 14:01 adamvoss

@vossad01, No

Project <=> Github Repository (akka/akka)
Artifact <=> Sbt project             akka-actors
Release <=> Pom                     akka-actors_2.11 2.4.3

With the currently deployed Scaladex (without https://github.com/scalacenter/scaladex/pull/340) this is what you see:

< Project Readme > | Release

MasseGuillaume avatar Jan 15 '17 14:01 MasseGuillaume

The dependents box on an Artifact's Page shows all dependent artifacts of the currently selected version and Scala target of the artifact. The "depends-on" search (Artifact Dependencies) shows all dependent projects of any version and any Scala target of the artifact?

Does the bolded text fix my description?

adamvoss avatar Jan 15 '17 15:01 adamvoss

Yep

the currently selected version and Scala target of the artifact.

this is a release, we can call them release dependencies.

MasseGuillaume avatar Jan 15 '17 15:01 MasseGuillaume

(comment withdrawn. moved to #354)

adamvoss avatar Jan 15 '17 15:01 adamvoss