Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/console.wat
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
)
)
(export (;1;) "console" (type 0))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this get bumped to 01? I don't really see reasoning in this PR but I assume it is due to the face this feature is no turned on?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah that's around here where by changing the static this is changing the default emission as well

(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
)
)
(export (;5;) "w1" (type 4))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/diamond.wat
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
)
)
(export (;7;) "w3" (type 6))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/doc-comments.wat
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
)
)
(export (;5;) "coverage-world" (type 4))
(@custom "package-docs" "\00{\22docs\22:\22package docs;\22,\22worlds\22:{\22coverage-world\22:{\22docs\22:\22world docs\22,\22interfaces\22:{\22i\22:{\22docs\22:\22world inline interface docs\22,\22funcs\22:{\22f\22:\22inline interface func docs\22},\22types\22:{\22t\22:{\22docs\22:\22inline interface typedef docs\22}}}},\22types\22:{\22t\22:{\22docs\22:\22world typedef docs\22}},\22funcs\22:{\22imp\22:\22world func import docs\22,\22exp\22:\22world func export docs\22}}},\22interfaces\22:{\22coverage-iface\22:{\22docs\22:\22interface docs\22,\22funcs\22:{\22[constructor]res\22:\22constructor docs\22,\22[method]res.m\22:\22method docs\22,\22[static]res.s\22:\22static func docs\22,\22f\22:\22interface func docs\22},\22types\22:{\22t\22:{\22docs\22:\22basic typedef docs\22},\22r\22:{\22docs\22:\22record typedef docs\22,\22items\22:{\22f1\22:\22record field docs\22}},\22fl\22:{\22items\22:{\22f1\22:\22flag docs\22}},\22v\22:{\22items\22:{\22c1\22:\22variant case docs\22}},\22e\22:{\22items\22:{\22c1\22:\22enum case docs\22}}}},\22other-comment-forms\22:{\22docs\22:\22other comment forms\5cn multi-line block\22,\22funcs\22:{\22multiple-lines-split\22:\22one doc line\5cnnon-doc in the middle\5cnanother doc line\22,\22mixed-forms\22:\22mixed forms; line doc\5cnplus block doc\5cn multi-line\22}}}}")
(@custom "package-docs" "\01{\22docs\22:\22package docs;\22,\22worlds\22:{\22coverage-world\22:{\22docs\22:\22world docs\22,\22types\22:{\22t\22:{\22docs\22:\22world typedef docs\22}},\22funcs\22:{\22imp\22:{\22docs\22:\22world func import docs\22}},\22interface_exports\22:{\22i\22:{\22docs\22:\22world inline interface docs\22,\22funcs\22:{\22f\22:{\22docs\22:\22inline interface func docs\22}},\22types\22:{\22t\22:{\22docs\22:\22inline interface typedef docs\22}}}},\22func_exports\22:{\22exp\22:{\22docs\22:\22world func export docs\22}}}},\22interfaces\22:{\22coverage-iface\22:{\22docs\22:\22interface docs\22,\22funcs\22:{\22[constructor]res\22:{\22docs\22:\22constructor docs\22},\22[method]res.m\22:{\22docs\22:\22method docs\22},\22[static]res.s\22:{\22docs\22:\22static func docs\22},\22f\22:{\22docs\22:\22interface func docs\22}},\22types\22:{\22t\22:{\22docs\22:\22basic typedef docs\22},\22r\22:{\22docs\22:\22record typedef docs\22,\22items\22:{\22f1\22:\22record field docs\22}},\22fl\22:{\22items\22:{\22f1\22:\22flag docs\22}},\22v\22:{\22items\22:{\22c1\22:\22variant case docs\22}},\22e\22:{\22items\22:{\22c1\22:\22enum case docs\22}}}},\22other-comment-forms\22:{\22docs\22:\22other comment forms\5cn multi-line block\22,\22funcs\22:{\22multiple-lines-split\22:{\22docs\22:\22one doc line\5cnnon-doc in the middle\5cnanother doc line\22},\22mixed-forms\22:{\22docs\22:\22mixed forms; line doc\5cnplus block doc\5cn multi-line\22}}}}}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/empty.wat
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
)
)
(export (;5;) "actually-empty-world" (type 4))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
)
)
(export (;1;) "foo" (type 0))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/exports.wat
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
)
)
(export (;3;) "export-foo" (type 2))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/flags.wat
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
)
)
(export (;3;) "flags-world" (type 2))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/floats.wat
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
)
)
(export (;3;) "floats-world" (type 2))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
)
)
(export (;1;) "foo" (type 0))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
)
)
(export (;5;) "import-and-export" (type 4))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/integers.wat
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
)
)
(export (;3;) "integers-world" (type 2))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/lists.wat
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
)
)
(export (;3;) "lists-world" (type 2))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/multi-doc.wat
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
)
)
(export (;7;) "a2" (type 6))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/multiple-use.wat
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
)
)
(export (;5;) "baz" (type 4))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/pkg-use-chain.wat
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
)
)
(export (;5;) "foo" (type 4))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/pkg-use-chain2.wat
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
)
)
(export (;5;) "foo" (type 4))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
)
)
(export (;3;) "bar" (type 2))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
)
)
(export (;1;) "foo" (type 0))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/print-keyword.wat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
)
)
(export (;1;) "interface" (type 0))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/records.wat
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
)
)
(export (;3;) "records-world" (type 2))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
)
)
(export (;3;) "foo-world" (type 2))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/resources.wat
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
)
)
(export (;11;) "implicit-own-handles3" (type 10))
(@custom "package-docs" "\00{\22worlds\22:{\22implicit-own-handles3\22:{\22types\22:{\22a\22:{\22docs\22:\22there should only be one `list` type despite there looking like two\5cnlist types here\22}}}},\22interfaces\22:{\22implicit-own-handles2\22:{\22types\22:{\22a\22:{\22docs\22:\22the `own` return and list param should be the same `own`\22},\22b\22:{\22docs\22:\22same as above, even when the `list<b>` implicitly-defined `own` comes\5cnbefore an explicitly defined `own`\22},\22c\22:{\22docs\22:\22same as the above, the `own` argument should have the same type as the\5cnreturn value\22}}}}}")
(@custom "package-docs" "\01{\22worlds\22:{\22implicit-own-handles3\22:{\22types\22:{\22a\22:{\22docs\22:\22there should only be one `list` type despite there looking like two\5cnlist types here\22}}}},\22interfaces\22:{\22implicit-own-handles2\22:{\22types\22:{\22a\22:{\22docs\22:\22the `own` return and list param should be the same `own`\22},\22b\22:{\22docs\22:\22same as above, even when the `list<b>` implicitly-defined `own` comes\5cnbefore an explicitly defined `own`\22},\22c\22:{\22docs\22:\22same as the above, the `own` argument should have the same type as the\5cnreturn value\22}}}}}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/simple-deps.wat
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
)
)
(export (;1;) "foo" (type 0))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/simple-multi.wat
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
)
)
(export (;3;) "foo" (type 2))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/simple-use.wat
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
)
)
(export (;3;) "console" (type 2))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/simple-world.wat
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
)
)
(export (;3;) "the-world" (type 2))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/type-alias.wat
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
)
)
(export (;3;) "my-world" (type 2))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/type-alias2.wat
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
)
)
(export (;3;) "my-world" (type 2))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
)
)
(export (;1;) "a" (type 0))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/use-chain.wat
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
)
)
(export (;5;) "baz" (type 4))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/use-for-type.wat
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
)
)
(export (;5;) "baz" (type 4))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/variants.wat
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
)
)
(export (;3;) "variants-world" (type 2))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-component/tests/interfaces/wasi-http.wat

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
)
)
(export (;1;) "has-inline" (type 0))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
)
)
(export (;5;) "c" (type 4))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
)
)
(export (;5;) "just-export" (type 4))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
)
)
(export (;5;) "with-imports" (type 4))
(@custom "package-docs" "\00{}")
(@custom "package-docs" "\01{}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
Expand Down
2 changes: 1 addition & 1 deletion crates/wit-parser/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const PACKAGE_DOCS_SECTION_VERSION: u8 = 1;
/// tools we'll still try to emit the v0 format by default, if the input is
/// compatible. This will be turned off in the future once enough published
/// versions support the v1 format.
const TRY_TO_EMIT_V0_BY_DEFAULT: bool = true;
const TRY_TO_EMIT_V0_BY_DEFAULT: bool = false;

/// Represents serializable doc comments parsed from a WIT package.
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
Expand Down