Skip to content
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

WIT: Implement @since and @unstable annotations #1508

Merged
merged 11 commits into from
May 28, 2024

Commits on May 28, 2024

  1. Configuration menu
    Copy the full SHA
    85e9791 View commit details
    Browse the repository at this point in the history
  2. Preserve error context when highlighting errors

    Previously the entire error message was replaced, losing any attached
    context. This commit updates error highlighting to only augment the
    single error found in the chain that's being highlighted (in the most
    common case). This required a small refactoring of the `Error` type and
    changes all existing users to a method-based constructor rather than
    explicit struct-based construction.
    alexcrichton committed May 28, 2024
    Configuration menu
    Copy the full SHA
    a37b628 View commit details
    Browse the repository at this point in the history
  3. Add initial parsing of attributes

    Nothing uses the results of parsing yet, that's going to come in a
    future commit.
    alexcrichton committed May 28, 2024
    Configuration menu
    Copy the full SHA
    043a0a0 View commit details
    Browse the repository at this point in the history
  4. Record spans for all types in UnresolvedPackage

    Will be used for errors in a future commit.
    alexcrichton committed May 28, 2024
    Configuration menu
    Copy the full SHA
    4aea177 View commit details
    Browse the repository at this point in the history
  5. Push stability attributes into top-level AST

    This commit pushes stability attributes through the resolution process
    to the next stage of AST. The top-level user-facing types in
    `wit-parser` now have `Stability` annotations were they can be added.
    
    This commit notably changes the `WorldItem::Interface` enum variant to
    contain a stability attribute in addition to the id listed.
    alexcrichton committed May 28, 2024
    Configuration menu
    Copy the full SHA
    945c44a View commit details
    Browse the repository at this point in the history
  6. Filter out @unstable items that aren't enabled

    This finishes support for `@unstable` and `@since` in `Resolve` by
    handling all items there and specifically filtering out any disabled
    items.
    alexcrichton committed May 28, 2024
    Configuration menu
    Copy the full SHA
    8ebbf90 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    328ea76 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3b6868e View commit details
    Browse the repository at this point in the history
  9. Round-trip stability through the wasm binary format

    This involved a number of refactorings and "tricks" to get this to work
    out. Namely when possible the old format of the custom section is still
    emitted to ensure older/newer tools can interoperate when possible.
    alexcrichton committed May 28, 2024
    Configuration menu
    Copy the full SHA
    bade98f View commit details
    Browse the repository at this point in the history
  10. Fix compile

    alexcrichton committed May 28, 2024
    Configuration menu
    Copy the full SHA
    cbebb66 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6bd6982 View commit details
    Browse the repository at this point in the history