astashov / crossdart

Cross-reference of Dart packages
http://crossdart.info
BSD 2-Clause "Simplified" License
13 stars 3 forks source link

feature request : see importers of a package #15

Open joeblew99 opened 7 years ago

joeblew99 commented 7 years ago

I was told to contact you from the flutter team on gitter. https://gitter.im/flutter/flutter

Is there a way to see all projects that happen to use a dart package ?

For example in the golang world its easy to find all projects that use github.com/asdine/storm. Link: https://godoc.org/github.com/asdine/storm?importers

This is useful because it allows developers to see working examples of code bieng used, and also to see how popular a package.

I coudl NOT see how i could do that easily with cross dart. Cross dart is awesome BTW. There is not an equivalent of that i the golang world. From all the data in cross dart it should be easy to produce the importers functionality i woudl have thought because you already have linking working in cross dart ?

astashov commented 7 years ago

Unfortunately, there's no easy way to get it at the moment. I don't have any database, which stores dependencies between packages. Crossdart is more similar to dartdoc - it generates HTML or JSON from the package or project, but it doesn't really store anything. And crossdart.info site is just a static site - it stores some metadata info in Google Datastore to know what packages were already generated, and that's it.

So, to add that feature, we'll need to start storing dependencies for every package, and then generate HTML pages from these dependencies.

I see usefulness in that, but unfortunately not sure I'll be able to find time soon to add that functionality to Crossdart.

astashov commented 7 years ago

Also, I think that functionality would live in https://github.com/astashov/dartdocs.org, which uses dartdoc to build https://dartdocs.org and uses crossdart to build https://crossdart.info. Crossdart package itself is dumb - it just generates HTML from the package or project.

joeblew99 commented 7 years ago

thanks for the reply....

Its pretty much the same with golang.

godoc is identical to dart doc in the sense that each golang project can be analysed. https://godoc.org/golang.org/x/tools/cmd/godoc

Collecting the one to many info is pretty easy i would have thought. If anyone else gets time it would be awesome.

astashov commented 7 years ago

Yeah, you can extract the dependencies from .packages while going through the packages in https://github.com/astashov/dartdocs.org. It's not that hard, but could be a bit time consuming. I'm open to contributions ;)

joeblew99 commented 7 years ago

i am a golang guy , that is using Dart for GUI. I would love to be able to do it, but i doubt i the dude for the job.. sorry

I wonder is the core google Dart team woudl be open to doing this ? It seems to be this is very useful community tool.. You should ask...

astashov commented 7 years ago

No problem. Still a good thing to get, let's keep the issue open, maybe I'll get to it eventually.

joeblew99 commented 7 years ago

ok..