-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create an apitest
tool for stabilizing core interfaces.
#6508
Comments
I'd be interested to hear other ideas on this topic. |
This would be neat, there are a lot of bits of the container interfaces that definitely aren't ever going to change (everything in Container/Map/Set that isn't an iterator). I'd like to be able to mark them as stable, even if it was somewhat painful/redundant. |
After thinking about this further let's adopt node's stability levels. We can use attributes to tag items. The tool then would periodically extract the public item signatures, exporting them to a file or comparing them against a file. Approved API changes would then need to use the tool to regenerate the signatures file and check it in. Depending on how elaborate you want the tool's reporting to be there could be overlap in functionality with rustdoc. |
The compiler can also warn about using unstable, experimented, deprecated apis. |
If there is already a |
If we wanted to validate test coverage for stable features this would probably be the tool for that as well. |
I've started work on this in my |
visiting for triage. nothing to add. |
Triage: we now have semi-supported stability attributes, nothing else to add. |
Triage: we have stability attributes for this purpose, and while it's not quite the same thing, it's working at the moment. I feel like this may be a conceptual dup of another issue relating to stability detection, but I'm not sure, so leaving it open for now. |
Revisiting a few months later, we have a good story with how we ensure lack of breakage here, through stability attributes. So giving this a close. |
This would be a tool to guarantee stability and backwards-compatibility of core library interfaces. It takes a rust source file (the 'spec') that declares the item's and
pub uses
in core, without implementation. It then parses both the spec and the library and compares them. Any mismatches are errors. Report various metrics about stable/unstable APIs.The goal is to make it very difficult to change interfaces that are stable. The downside is that you have to ultimately redeclare all of core.
The text was updated successfully, but these errors were encountered: