Skip to content

Conversation

@halo
Copy link

@halo halo commented Nov 5, 2025

Using --fatal-deprecation 1.93.3 causes unrelated warnings:

Warning: mixed-decls deprecation is obsolete, so does not need to be made fatal.
Warning: type-function deprecation is obsolete, so does not need to be made fatal.

I think it is because Depdecation.forVersion does not filter out deprecations that have been marked as obsoleteIn.

This is my attempt to solve it. I hope I don't have to sign the Google Individual Contributor License Agreement, because I don't use a Google Account (I see no way to sign the agreement without an account, though I'm fine with agreeing to its contents, although my code is just a single conditional and the obvious related test). Also, the newly added test passes, and the grinder linted my code (as far as I can tell), but I could not run the -x node tests for some reason.

If this is unacceptable feel free to close this PR. It was a nice exercise learning something about Dart! Thank you for your time.

PS: This project is so well maintained and I'm grateful to @nex3 who kept in in shape for years and put so much effort in documentation and figuring out a path to go forward with the SASS syntax as CSS evolves more and more. Thank you!

Related: #2647

Copy link
Member

@jathak jathak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch with this! --fatal-deprecation <version> should definitely not make deprecations that were obsolete as of <version> fatal.

However, I actually think it makes more sense to exclude all deprecations that are obsolete in the currently running version from --fatal-deprecation, even if they weren't yet obsolete in the <version> passed to the flag.

If for instance, --fatal-deprecation 1.91.0 was added to a user's config when 1.91.0 was the current version, it makes sense for the flag to continue to work without warnings in 1.92.0 when mixed-decls and type-function are obsoleted without the user having to bump the fatal version to 1.92.0, which would additionally make with-private fatal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants