Discussions on pub.dev usually end up with caveat emptor, “Let the buyer beware.” But in the world of consumer goods, there are often hidden qualities that can be addressed with labeling, such as nutrition labels on food or materials labels on furniture or linens. I would like to start a discussion on improved labeling for pub.dev packages. Please let me know what you think.
I see two areas for improved labeling: State Mgmt. and side effects. On poorly documented packages, these hidden qualities often are not obvious and can produce pain points that are difficult to debug. Simple example programs may not expose these issues. They are often not found until later in the development process. My LLM AI has difficulty anticipating these issues, often starting off with “Wow, that is very strange!”. So, what are these areas?
Actually, when I say State Mgmt. I think the broader issue is Flow Control: Not just unusual use of setState or state mgmt., but built in delays, or deferred processing. I am always suspicious of packages that contain an await Future.delayed(Duration(seconds: 1)); The biggest pain point is when I get a package to work in Debug but it fails to build for Release because the latter exposes additional timing issues on one or more target platforms. Label it!
Side effects might be called style deviations. I tend to follow SOLID in my coding, but packages do not necessarily follow that style. If a package has a class or method that alters one of its parameters or changes a global field for later use, that should be documented clearly. These can be difficult to debug and do not always show in the example programs. Label it!
A key issue is enforcement, which does not exist. I would keep it simple. Add these 2 labels to every package description as part of the documentation and score them within the documentation score. Initially these would read “not addressed.” When users submit GitHub Issues (Problem Reports) these would be 2 additional categories for classifying the issues.
So, what is your take on the technical issues? What other issues could be labeled?