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

Merge with upstream #92

Merged
merged 6 commits into from
May 29, 2024
Merged

Merge with upstream #92

merged 6 commits into from
May 29, 2024

Conversation

dhil
Copy link
Member

@dhil dhil commented May 29, 2024

No description provided.

fitzgen and others added 6 commits May 21, 2024 19:44
…1575)

The CG voted today to conservatively allow only two page sizes: 1 byte and 64
KiB. This updates `wasmparser`'s validation to match that decision.
This is preventing CI from working currently and fixes a new warning
cropping up in nightly.
* Add a span to all types when parsing

* 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.

* Add initial parsing of attributes

Nothing uses the results of parsing yet, that's going to come in a
future commit.

* Record spans for all types in `UnresolvedPackage`

Will be used for errors in a future commit.

* 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.

* 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.

* Add CLI support for WIT features

* Implement printing WIT stability attributes

* 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.

* Fix compile

* Fix some compile warnings
* Update the spec test suite submodule

This commit updates the spec test suite submodule and notably
implements the extended syntax in the text format for quoted
identifiers. Names such as `$"foo"` are not valid and equivalent to
`$foo`. This doesn't yet update any `wasmprinter`-based printing to use
this new syntax, it's just parsed to pass the various spec tests added.

This additionally updates the lexer to have a first-class notion of an
annotation instead of being lumped in with "reserved" tokens to avoid
having to deal with things like `@"foo""bar"` which is a single reserved
token but technically not an annotation. This is now modelled
differently within the lexer as `TokenKind::Annotation` or
`TokenKind::Reserved`. (and can have a better first-class error in the
future).

* Fix warning on nightly

* Clarify difference in errors
[automatically-tag-and-release-this-commit]

Co-authored-by: Auto Release Process <auto-release-process@users.noreply.github.com>
@dhil dhil merged commit 627263e into wasmfx:main May 29, 2024
25 checks passed
@dhil dhil deleted the wasmfx-merge branch May 29, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants