Implement @deprecated annotation
Using a @deprecated function or global yields a warning (note).
Decide on behaviour for enums, constants etc. Also note the need to link it with versions.
Note that @deprecated is in, but there is no version flag yet. In a sense we want this to hook up with a general versioning on libraries, so the basic problem here is to link up the deprecation with a library.
One possibility is simply this: @deprecate("Use foo instead", .since = "[email protected]", .removed = "mylib@4")
To unpack this:
- First argument gives the compile information.
- Optional "since" both says (1) which library it belongs to and (2) at what version use it began to be considered deprecated.
- Optional "removed" is saying for what version it will be removed.
So typically the "since" version number is fairly uninteresting when you actually have a version you include. Since that version will presumably already have it deprecated. But it shows how long it's been deprecated. The "library"-part on the other hand is essential to know what library it belongs to unless that information can be inferred from something else.
The removed likewise is more about information.