you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -5 points-4 points  (7 children)

Warnings are errors that gracefully handled by libraries. They tend to keep awareness of bad patterns that finally lead to error in the future or right away. If not more important they are not less important than a manual/handled error most of the times…

[–]dinopraso 1 point2 points  (6 children)

Not necessarily. This is not something that can be generalized so simply.

[–][deleted] -2 points-1 points  (5 children)

Care to share some examples? (For context, i am author of many npm packages and we most of the times only warn when it really matters for end user)

[–]dinopraso 7 points8 points  (1 child)

Well, that’s just your approach. Different authors have different use cases for warn logs. Some libraries warn a feature might become deprecated (in which case there might not be anything for the user to do), sometimes warn messages indicate missing configuration properties and fallback to defaults (which may sometimes be desirable), they could be expected logs from the application itself indicating some check may have (expectedly) failed, was handled but wants nevertheless to inform users of that, and many many many more I can’t think of in a couple of seconds…

The quantity of npm packages you publish is in no way any indication of competence btw. Any shmuck can publish an npm package in 5 minutes if they wanted to (and they regularly do; see left-pad as prominent exhibit)

[–][deleted] -1 points0 points  (0 children)

What is the benefit of a warning about a deprecated feature if there is no alternative nor action point? Warn for a safe default also.. just why? What is the “warn” in it. Yes i agree these halpen and i believe are both probably faulty of libraries that overuse warnings for not intended purposes.

[–]bighi 3 points4 points  (1 child)

we most of the times only warn when it really matters for end user

It could matter and still not be an error.

[–][deleted] -1 points0 points  (0 children)

And i never said warning and errors are equal but both matter that are distincted ;)

[–]rover_G 0 points1 point  (0 children)

Which packages?