Open dnfield opened 5 years ago
Agreed, this would be awesome...
Please refile this issue in the repository for the pub service: https://github.com/dart-lang/pub-dartlang-dart
Note. a prerequisite of this would be source listings for Dart, ideally with cross referencing and other stuff... I asked about this on dartdoc not that long ago..
Note. pub.dartlang.org already does search public API extracted during dartdoc generation.. and dartdoc already supports simple search within the given package.. but there is no source listings or cross referencing in the code.
@kevmoo can this be transfered or should I just close it and open a new one?
What I'd really like is not just the source listings for Dart, but also any other source in there - Objective C, Java, Swift, Kotlin, C/C++, etc. But even just Dart would be good to start with.
What would be the top use-cases for this? While it sounds like a cool feature, I worry that we would have a hard time providing something significantly better than github codesearch provides (of course this assumes that plugins are available on github...) , and falls outside the scope of the pub service as I see it: providing access to the public api of packages. Not saying we shouldn't do it - just want to understand the proposal better.
Githubs codesearch is pretty poor imo. It doesn't understand syntax, or even support searching for a literal beyond simple cases.
I would see the following use cases:
I've personally used https://go-search.org/ before, it can be useful to find examples of how stuff works.
This is still relevant
Something like https://cs.chromium.org/ would be really nice to have for pub.
It would help Flutter contributors understand the impact of (potentially) breaking changes better. It would also help the community be able to find example implementations of classes/methods/etc. they're interested in.
It would be important that this functionality allow searching all source files contained in a package, not just the public portions of the library. It would be nice if it could include searching of any non-Dart source as well (such as Java/Kotlin/ObjC/Swift files in Flutter plugins, but potentially other langauges as Dart FFI becomes a reality).
/cc @goderbauer @hixie