Open cgranade opened 3 years ago
One other thought, but Rust requires that all uses of #[unstable]
link to a GitHub tracking issues that users can look at for more details; would similar makes sense here as a possible modification to @Unstable()
?
Attributes for denoting API stability levels
Conceptual overview
This proposal introduces two new attributes for marking the stability level of public Q# APIs, allowing for warnings to be generated when calling into unstable functions and operations.
This in turn will allow for new library features to be developed and prototyped in an unstable state without blocking on a complete API review, and for us to get more feedback on how unstable APIs work in practice before committing to final versions.
Current status
No distinction is made between different stability levels; all public Q# functions, operations, and UDTs are considered to be fully stable from their first release.
User feedback
n/a
Related issues
Proposal
New and modified functions, operations, and UDTs
Modifications to style guide
If this proposal is adopted, API stability rules should be relaxed only for those functions, operations, and user-defined types denoted with
@Unstable
. Authors should be encouraged to place either@Unstable("...")
or@Stable("...")
, with stability being implied in the absence of any stability attribute.Impact of breaking changes
n/a
Examples
Current status
n/a
Using proposed changes
See documentation comments on proposal above.
Relationship to Q# language feature proposals
Alternatives considered
Open design questions and considerations
@Stable()
be dropped in favor of only marking as unstable?@Stable()
require version numbers (similar to Rust's#[stable("...")]
attribute)?