Open matanlurey opened 8 months ago
Also I know sometimes this side of the Dash ecosystem lacks dedicated folks contributing frontend (user-facing) features and website upgrades, so if there is something that would help some of the frictions above and it just lacks resourcing, feel free to reach out privately, this is something I'd contribute to.
Here's some more ideas:
depends_on:
or likes:>20
)Some of those ideas like transitive dependency cost are solid!
I tried to make this actionable, but if filing sub-issues is more useful, or this isn't useful to y'all, feel free to close it.
I'm hesitating to close this straight away - it clearly has a lot of thought behind it and contains many useful ideas.
But as an item on the issue tracker it is almost useless to us. I don't think it works well to discuss all of these things in the same thread. A lot of these issues are known and have their own issue already.
Please comment/vote on existing issues, or open new ones if something is not all covered.
I'm happy to see that we are working on some of this or have loose ideas about what we might do for other parts.
Some thoughts:
no-crypto
), or that the crypto implementations it contains are correct correct-crypto
. Obviously, within an organization most people might be qualified to do no-crypto
reviews, but only domain experts are qualified to do correct-crypto
reviews. This is very complex and sharing reviews between organizations is not easy. But it's an interesting idea.To be clear, I think I agree with most of the problems / issues you highlight. I'm not sure how to address all of them. And some of it certainly harder than it seems.
Encourage authors to write comparisons between their own package and similar packages.
How would this be done, in terms of how would maintainers be encouraged, how would this be monitored/detected, and also, would this be qualitative or quantitative? And how can a user be sure the comparison is unbiased?
Make the size of the package and how many transitive dependencies it carries more visible
In terms of transitive dependencies, I think the current listing of them is good enough. Otherwise packages that perform any kind of network and IO already have a disadvantage (http, path, path_provider are basically a given). I don't think an absolute metric would be very beneficial.
Whilst some of those ideas are good and potentially useful, I think some care needs to be taken. Whilst useful for users looking for packages, they could be a pain for maintainers.
I tried to make this actionable, but if filing sub-issues is more useful, or this isn't useful to y'all, feel free to close it.
I'm posting this fairly abstract problem just to mostly share my experiences finding (and using) Flutter plugins - it's plausible the exact same concerns carry over to plain Dart packages but I intentionally am not adding many of these in my projects (Flutter plugins do something non-trivial for me for a platform I don't totally understand, Dart is typically platform agnostic so it's easier for me to just roll my own).
I don't want to pick on a specific author or package, so use anything linked below as an example only.
Some suggestions have already been made in the past by @jayoung-lee:
Mark commercial packages: Incentivize individual and agencies to produce high-quality supported packages (I would have been happy to pay for a better package, but I can't find one). One interesting bit I saw in the React Native ecosystem was additional docs and examples being behind "sponsor" (paid) gates.
Show GitHub metrics for packages, some of the packages I use upon looking at GitHub were more clear they were under-maintained, and I might have made better decisions if pub displayed some metrics for me.
Explain popularity metrics to me. This could be done multiple ways, but anything that could (even relative #s versus absolute) explain "this package was popular in the past, but is being used less and less" or "this package is not very popular overall, but is trending" would help me make a decision.
Something other than thumbs up to indicate qualitative quality. @mit-mit originally filed https://github.com/dart-lang/pub-dev/issues/1517, which certainly helps, but how do I help future package authors avoid (or make better decisions) using a package?
Keep pushing on good native interop. In the case of what I wanted (file picker), I would have happily written the "native" code and used a combination of FFI and JS Interop over using a package/plugin, but I was scared away by the fact I'm not familiar with tools like
jni_gen
and they aren't seamless the way thedart
orflutter
CLI is. Maybe I should try them anyway?Have a stricter bar for judging package quality, i.e. a higher % of public APIs documented, test coverage (?), stricter lints/a stricter style-guide.
The
file_picker
plugin is a top 20 package across all of pub:However, it upon casual use, is (IMO) much harder to use and less idiomatic than I'd expect for such a package:
pickFiles
and returns a List.These might seem like nit-picks, but this is probably a package than N% of all Flutter users and companies try when evaluating or developing an app (exporting/importing data to the file system is relatively common, particularly in some app types), but the quality is much lower than you'd expect for something so high in the ranking.
As an example, I looked at "what is the top 20 package in other ecosystems":
Rust: Has no concept of popular, though I personally like the discoverability of categories:
I know Dart is starting to add these, but I struggled to find references to topics/keywords anywhere on pub.dev.
The 20th most downloaded crate,
rand_chacha
is arguably a lot different than a Flutter plugin, so you can even look at the 20th most downloaded game engine, isbevy
, which is a huge and well-established game engine ecosystem.Node only provides a search feature, and no rankings.
There are proxies generated elsewhere. The 21st most popular package is
inquirer.js
, which I've personally used before and is great, has good documentation, etc.I also looked at the React Native Directory to make sure I was making a more fair comparison to a similar ecosystem. The top 20 package is X, which is fairly different than
file_picker
, but anecdotally appears high[er] quality. I found some of the data of how popularity is determined here pretty interesting (https://reactnative.directory/scoring):Fwiw, I also looked for the top ranking
file_picker
-like package, which isdocument-picker
. It appears to be higher quality, and is well documented, though interestingly only sponsors (on GitHub) have access to the example app.