Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Better type deprecation messages #97114
Motivation for this change
We want to deprecate option types over time, but how it's currently done, it's very hard to figure out which options actually use these deprecated types. This PR improves on this by allowing types to set a
So with an option using
I also plan to deprecate more types in the future.
Not sure what you mean.
@Infinisil I meant that the implementation of
It was actually cole-h that noticed this in #96042
@rnhmjoj I guess that's just because only a subset of
Previously the only way to deprecate a type was using theType = lib.warn "deprecated" (mkOptionType ...) This caused the warning to be emitted when the type was evaluated, but the error didn't include which option actually used that type. With this commit, types can specify a deprecationMessage, which when non-null, is printed along with the option that uses the type
Has been deprecated since fd803fc (2013-08-22)