Skip to content

deprecated and deprecated_after should not be separate attributes #19138

@JalonSolov

Description

@JalonSolov

Describe the feature

These 2 attributes should be combined into a single attribute, because you should never be allowed to make something deprecated without specifying a date where it will become an error to use it. You also shouldn't be allowed to mark something deprecated with a date, but no message.

Alex agrees with the idea: https://discord.com/channels/592103645835821068/592106336838352923/1133052769280995369

Use Case

It is frustrating to see a deprecation notice without a message, or to see a message, but it never turns into an error.

Proposed Solution

Alex's suggestion is [deprecated('xxx', '2100-01-01')] - doesn't matter that much to me, as long as the 2 attributes are combined.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Version used

All

Environment details (OS name and version, etc.)

All

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature/Enhancement RequestThis issue is made to request a feature or an enhancement to an existing one.Nicer V ErrorsBugs/feature requests, related to improving V error messages.Type: SpecificationEverything related to the formal specification of how V should behaveUnit: CompilerBugs/feature requests, that are related to the V compiler in general.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions