r/FlutterDev • • Apr 08 '23

Discussion Pub.dev needs an abandoned flag

I get it. Publishing a plugin is often a thankless task, and you move on to other code or companies or languages and your open source contribution languishes. Maybe it will be forked and someone else will take it forward, but most of the time it just goes away slowwwly.

However, the package will live on in pub.dev, and if it was highly scored (likes, pub points, popularity?) it will take years to fall off the leaderboard. Meanwhile the issues log is filled with questions about whether the project is dead, or whether the author is ok.

We could use a metric that considers whether the maintainers of the project are still active in the commit logs, issues, prs. Perhaps something like shields.io?

264 Upvotes

46 comments sorted by

65

u/Infamous-Date-355 Apr 08 '23

I completely agree

17

u/ankmahato Apr 08 '23 edited Apr 08 '23

Sorry for hijacking the first comment.

Folks looking for indicators showing whether a package has been abandoned should check out fluttergems.dev

It shows relevant badges for packages that have poor maintenance and also maps the corresponding GitHub stats (like open issues). I find it very helpful.

1

u/KaiserYami Apr 09 '23

This looks great!

41

u/ueman Apr 08 '23

There's already a discontinued flag. The problem is that it's work to add it, so not a lot of people use it. Abandonment is often not intentional, but rather just passively happens.

We could use a metric that considers whether the maintainers of the project are still active in the commit logs, issues, prs. Perhaps something like shields.io?

Libraries can be feature complete without the need to do something, so no activity does not necessarily indicate abandonment.

It's a tough problem.

1

u/[deleted] Apr 08 '23

I think something along the lines of a growing number of open PRs and the minimum time delta from the last modification of the main repository and the latest opened PR. count(Open PR Authors since repo last updated) > 3 and (today - max(repo last updated, last opened PR date)) > 1 year

This is me thinking in a textbox but my assumptions are that one of us will try to create a fix/enhancement and get no response or closure. The PRs could be considered a challenge to the “feature complete” state. If enough people are making this challenge without a response…. It’s most likely abandoned. The minimum ask would be for maintainer to modify or reject 1 PR a year without reason.

Is this an acceptable statement? No activity && No engagement && Not Discontinued == Abandoned

1

u/ueman Apr 13 '23

What about closed source libraries? How do you reasonably expect pub.dev to support all the various git hosting providers?

Though, I agree that the metrics are nice.

1

u/[deleted] Apr 14 '23

You brought up an aspect I was not considering. I wouldn't expect any actionable items to come out of a closed source library being abandoned. I'd expect pub.dev to only support the top hosting providers but this could become unreasonable.

-1

u/ankmahato Apr 08 '23

Actually I disagree on this point.

Libraries can be feature complete without the need to do something, but a very important aspect you are missing out is maintenance testing.

It is good practice where maintainers should test their packages and ensure it is compliant with the latest Flutter SDKs and dependencies, at least once a year. It is also known as "maintenance release".

9

u/ueman Apr 08 '23

Sure, but what if there's nothing to do for years when maintenance testing keeps being green? That's very much possible when writing pure Dart code, or not using much from Flutter, since its APIs are fairly stable. It's at least common enough to not be just an edge case.

1

u/ankmahato Apr 08 '23

I am not saying you "must".

I am just saying it is a "good practice" in open source community to roll out a package release every year. It instills faith in people that the package does not break for latest Dart/Flutter versions.

Ultimately the decision is in the hands of the maintainer.

2

u/ueman Apr 08 '23

Releasing a new version when nothing needs to be fixed just wastes everyone's time. The maintainer needs to upload a new version and consumers need to update it. Consumers also need to make sure to check the changelog and run their tests again to make sure the depende cy update didn't break anything. All for a release which didn't even change anything. I fail to see how that can be good practice.

The pub points also already check for compatibility (pana checks against the latest stable release of Dart/Flutter), so compatibility is already reflected in the pub points.

Of course, if there's changes needed, I'm all for maintenance release as it makes total sense.

1

u/Gears6 Apr 08 '23

Releasing a new version when nothing needs to be fixed just wastes everyone's time. The maintainer needs to upload a new version and consumers need to update it. Consumers also need to make sure to check the changelog and run their tests again to make sure the depende cy update didn't break anything. All for a release which didn't even change anything. I fail to see how that can be good practice.

This is also a really good point. New version means you might have to update things or at least keep tabs on it.

1

u/Gears6 Apr 08 '23

Sure, but what if there's nothing to do for years when maintenance testing keeps being green? That's very much possible when writing pure Dart code, or not using much from Flutter, since its APIs are fairly stable. It's at least common enough to not be just an edge case.

You can make an empty commit indicating tested against whatever Flutter version.

As you rightly point out though, there are two problems.

  • Marking something as abandoned requires the package owner to go back and mark it as such. That's potentially extra work they won't do considering it is already abandoned.

  • The criteria for abandoned is dubious.

So I'm totally with you that and don't have any solutions.

18

u/sauloandrioli Apr 08 '23

We pub.dev users should have a "mark as abandoned" checkbook. Why try to automatize this when the community can help to find the packages that are abandoned.

7

u/Zalack Apr 08 '23

That could 100% be abused.

7

u/isoos Apr 08 '23

(Disclaimer: pub.dev contributor)

A package doesn't need to use GitHub or any other open access package repository to get it published on pub.dev. You can have a valid package with a (in)valid homepage, and you don't need to have public issues or commits to provide great value to the community.

Some packages have a git repository, but they wouldn't accept new issues or PRs. All of these are fine, and should be tolerated, as the main value is in the published code, and not in the issues or commits that lead to the code.

Having said that, we are open to new algorithms and suggestions to improve the scoring on pub.dev. If you have such suggestion, please open an issue for it, or upvote or comment on existing ones. https://github.com/dart-lang/pub-dev/issues

Also, sidenote: We are also close to roll out verified repositories on pub.dev (in a safe, sandboxed, and hosting-independent way), which will open up the possibility of accessing further metrics (which may be hosting-dependent though). However, we haven't seen clear indicators of goodness, and others pointed out, a feature-complete package is hard to distinguish from an abandoned one based on activity on the repository. I have packages in both categories, and even though I know their status, I wouldn't be able to point out differences in them. The problem is not ignored, it is just hard to resolve in a good way that is non-negative in all (or most) use cases.

4

u/ChristianKl Apr 09 '23

If a package fails at "Support up-to-date dependencies" and there is no update for the package in six months (or a year) that could be used to mark the package as abandoned.

I don't think that published code itself has much value if the code isn't trustworthy. A github repo is very useful because it tells you whether the package works for other people.

15

u/lgLindstrom Apr 08 '23

Second this.

7

u/riveraj33 Apr 08 '23

Yes this 👍🏼. It will clear out maybe half of all the packages!

8

u/[deleted] Apr 08 '23

Half? Optimist. At least 80%.

4

u/riveraj33 Apr 08 '23

😂 I was trying to be nice

5

u/adel_b Apr 08 '23

its therr already, called last updated

7

u/ykmnkmi Apr 08 '23

Not all packages need regular updates, I wrote codec package and updates to support SDK changes like Dart 2.0 release, null-safety. Now 3.0 is coming. One update in 2 years ))

2

u/remirousselet Apr 08 '23

There's one: Discontinued

Example on one of my old packages https://pub.dev/packages/union

2

u/MannyManMoin Apr 09 '23

I completely agree, I mean if a pub.dev plugin isnt updated 3 months after a major update like 3.7 -> 3.8 then it should get flagged as old until its updated, and should get flagged with the appropriate version it stopped getting updated towards in this case flutter 3.7.

2

u/steve_s0 Apr 08 '23

What's the problem with feature complete inactive packages? Unless the project is accumulating actual issues that aren't getting fixed, there's no reason to update just to update. There's already a prominent indicator of when a package was last updated. You can even sort by it. Use your judgement.

Now, it would be nice to be able to filter by activity, or issue filing rate, or something. I would like to be able to search for packages with > x pub points, sorted by most recently updated.

1

u/Logical_Marsupial464 Apr 08 '23 edited May 23 '25

slim crush doll lavish retire money cover point mighty resolute

This post was mass deleted and anonymized with Redact

1

u/ChristianKl Apr 09 '23

Even feature-complete packages often use libraries and if a package doesn't update it's libraries you can get into problems where your old feature-complete package depends on an older version of one package where you also have a dependency of a newer version of that package.

2

u/[deleted] Apr 08 '23

I was wondering.

What if we make a pub.dev clone, using pub.dev API's, but with some decent algorithm? All that site would do is to map pub.dev and enhance it.

We can even use github API to check, for instance, how many open issues vs closed issues are in the repo (too many open issues, bad).

Then, we would give a score based on real useful info.

-4

u/ankmahato Apr 08 '23

It is already done by fluttergems.dev

You can check it out.

0

u/[deleted] Apr 08 '23

[deleted]

0

u/isoos Apr 11 '23

> Score based on upvotes, comments, if github repository has not too many open issues, etc., or whatever score system the community think is useful

pub.dev already considers likes in ranking the search results.

However, not too many open issues can mean anything: that there are no issues or that they are closed aggressively (e.g. using a bot). Most of the metrics may be abused in one way or another, and whatever we choose, we will put incentives for the authors to behave in certain ways. (There is that Dilbert cartoon where the company starts paying for fixing bugs in the software and they are happy as they will become rich... from 1995 or so.)

0

u/[deleted] Apr 11 '23

[deleted]

1

u/isoos Apr 11 '23

As I've commented in this thread already: the team behind pub.dev is really open for ideas and you should share them as new issues on the issue tracker.

However, we also want to be responsible and apply these with a clear understanding that they will be an improvement and not just noise. The lack of similar features on other package repositories may be an indication that we need to think about it more. That doesn't mean inaction: we were and are giving a good example for other package repositories that package analysis is useful for the users (and also for the developers/publishers).

2

u/brown_paw Apr 08 '23

Sometimes I have to check the GitHub repo of the package and look at the existing issues before deciding whether to use it, which is an avoidable headache.

1

u/ChristianKl Apr 09 '23

The problem with pub points is that you need to do very little to get the maximum pub point score.

There should be pub points that you get for proper responses to issues.

2

u/Areneboy Apr 09 '23

Anyone can publish to pub.dev and there’s no requirement for the repository to be open source or for any issue tracker to be present. What a «Proper» follow-up in an issue tracker is highly subjective and would encourage maintainers to rather close issues than keep them open just for the sake of pub score, and not for the sake of good issue hygiene.

Nobody is entitled to the time commitment of open-source maintainers and contributors unless they’re on their payroll.

1

u/ChristianKl Apr 09 '23

Nobody is entitled to have people spend time on open-source. On the other hand, nobody is entitled to a high pub score either. A high pub score should reflect those packages that are managed in a way that's useful to the people who want to use the packages.

1

u/Areneboy Apr 09 '23 edited Apr 09 '23

The question is whether pub really should care about anything other than the code that’s published or if they should interfere with the human aspect of package maintenance, which is incredibly hard to «score» fairly and easy to abuse.

Not that I’m an opponent of the idea, I see what value there would be to it, but it’s hard to implement without side effects, hence why e.g. NPM, NuGet, Docker, cocoapods, etc. haven’t done anything similar.

1

u/xboxcowboy Apr 09 '23

How i choose to use a package Check as update date, if more than 15 months > pass Check github issue, more than 20 > pass.

Most of the camera package are outdated too

1

u/pedatn Apr 09 '23

pub.dev itself could also dock points for lack of maintenance maybe

2

u/isoos Apr 11 '23

It is kind of happening: if you have an old codebase and a new SDK with a newer lint, a prior version of the SDK may have been clean during analysis, giving you full score, while a newer version of the SDK reveals the issue, and the package gets fewer points now.

But I don't thing we should reduce points just because there is no change in the codebaase.

1

u/gimbalicious Apr 11 '23

For real..I used Hive in a project only to find out it was clearing all the app data on hot restart and the package has been abandoned.......rolls on floor crying *hive dun deleted my data!!*

-1

u/[deleted] Apr 08 '23

I have a (potentially) unpopular opinion: package authors should also be able to remove packages.

8

u/[deleted] Apr 08 '23

No. It will affect projects that are already using the package.

1

u/[deleted] Apr 08 '23

Understandable.