-
Notifications
You must be signed in to change notification settings - Fork 295
Closed
Description
when WIT is recreated from the resolved JSON, it has versioned feature gates on the unversioned wasmtime:test
package.
Given:
package wasmtime:test;
world test{
@unstable(feature = active)
include wasi:unstable/imports@0.2.3;
include wasi:foo/imports@0.2.3;
}
world test-ordered{
include wasi:foo/imports@0.2.3;
@unstable(feature = active)
include wasi:unstable/imports@0.2.3;
}
package wasi:unstable@0.2.3 {
@unstable(feature = active)
world imports {
@unstable(feature = active)
use wasi:dep2/stable@0.2.3.{stable-resource};
@unstable(feature = active)
use wasi:dep-unversioned/unversioned.{unversioned-resource};
@unstable(feature = active)
use wasi:dep-unstable/unstable.{unstable-resource};
}
}
package wasi:foo@0.2.3 {
@since(version = 0.2.0)
world imports {
@since(version = 0.2.0)
include wasi:dep2/imports@0.2.3;
include wasi:dep-unversioned/imports;
include wasi:dep-unstable/imports;
}
}
package wasi:dep2@0.2.3 {
@since(version = 0.2.0)
world imports {
@since(version = 0.2.0)
import stable;
}
@since(version = 0.2.1)
interface stable {
resource stable-resource {
}
}
}
package wasi:dep-unversioned{
world imports {
import unversioned;
}
interface unversioned {
resource unversioned-resource {
}
}
}
package wasi:dep-unstable{
@unstable(feature = active)
world imports {
@unstable(feature = active)
import unstable;
}
@unstable(feature = active)
interface unstable {
@unstable(feature = active)
resource unstable-resource {
}
}
}
the world test should not have the @since
@since(version = 0.2.0)
import wasi:dep2/stable@0.2.3;``` when regenerated:
the full resolved wit from the json:
package wasmtime:test;
world test {
@since(version = 0.2.0)
import wasi:dep2/stable@0.2.3;
@unstable(feature = active)
use wasi:dep2/stable@0.2.3.{stable-resource};
@unstable(feature = active)
import wasi:dep-unversioned/unversioned;
@unstable(feature = active)
use wasi:dep-unversioned/unversioned.{unversioned-resource};
@unstable(feature = active)
import wasi:dep-unstable/unstable;
@unstable(feature = active)
use wasi:dep-unstable/unstable.{unstable-resource};
}
world test-ordered {
@since(version = 0.2.0)
import wasi:dep2/stable@0.2.3;
@unstable(feature = active)
import wasi:dep-unversioned/unversioned;
@unstable(feature = active)
import wasi:dep-unstable/unstable;
@unstable(feature = active)
use wasi:dep2/stable@0.2.3.{stable-resource};
@unstable(feature = active)
use wasi:dep-unversioned/unversioned.{unversioned-resource};
@unstable(feature = active)
use wasi:dep-unstable/unstable.{unstable-resource};
}
package wasi:foo@0.2.3 {
@since(version = 0.2.0)
world imports {
@since(version = 0.2.0)
import wasi:dep2/stable@0.2.3;
import wasi:dep-unversioned/unversioned;
@unstable(feature = active)
import wasi:dep-unstable/unstable;
}
}
package wasi:unstable@0.2.3 {
@unstable(feature = active)
world imports {
@unstable(feature = active)
import wasi:dep2/stable@0.2.3;
@unstable(feature = active)
use wasi:dep2/stable@0.2.3.{stable-resource};
@unstable(feature = active)
import wasi:dep-unversioned/unversioned;
@unstable(feature = active)
use wasi:dep-unversioned/unversioned.{unversioned-resource};
@unstable(feature = active)
import wasi:dep-unstable/unstable;
@unstable(feature = active)
use wasi:dep-unstable/unstable.{unstable-resource};
}
}
package wasi:dep-unstable {
@unstable(feature = active)
interface unstable {
@unstable(feature = active)
resource unstable-resource;
}
@unstable(feature = active)
world imports {
@unstable(feature = active)
import unstable;
}
}
package wasi:dep-unversioned {
interface unversioned {
resource unversioned-resource;
}
world imports {
import unversioned;
}
}
package wasi:dep2@0.2.3 {
@since(version = 0.2.1)
interface stable {
resource stable-resource;
}
@since(version = 0.2.0)
world imports {
@since(version = 0.2.0)
import stable;
}
}
Originally posted by @ydnar in #2076 (comment)
A round trip test would help catch this.
Metadata
Metadata
Assignees
Labels
No labels