Skip to content

Commit 654be8e

Browse files
committed
fix: improve docstrings and add wizer 10.0.0 support
- Fix stardoc-compatible docstring format in tool_versions.bzl (description body must be single sentence before Args/Returns sections) - Add wizer 10.0.0 to supported versions in wizer_toolchain.bzl - Simplify docstring language for better documentation parsing
1 parent 36173ac commit 654be8e

File tree

3 files changed

+33
-32
lines changed

3 files changed

+33
-32
lines changed

MODULE.bazel.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

toolchains/tool_versions.bzl

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,13 @@ TOOL_COMPATIBILITY_MATRIX = {
7171
}
7272

7373
def get_tool_version(tool_name):
74-
"""Get the canonical version for a tool
74+
"""Returns the canonical version for the given tool name.
7575
7676
Args:
77-
tool_name: Name of the tool (e.g., "wasm-tools", "wit-bindgen")
77+
tool_name: The name of the tool (e.g., "wasm-tools", "wit-bindgen").
7878
7979
Returns:
80-
String: Version number
81-
82-
Fails:
83-
If tool_name is not defined in TOOL_VERSIONS
80+
The version string for the tool, or fails if tool_name is not defined.
8481
"""
8582
if tool_name not in TOOL_VERSIONS:
8683
fail("Unknown tool: {}. Available tools: {}".format(
@@ -90,28 +87,27 @@ def get_tool_version(tool_name):
9087
return TOOL_VERSIONS[tool_name]
9188

9289
def get_compatible_versions(base_tool, base_version):
93-
"""Get compatible versions for other tools based on a base tool version
90+
"""Returns compatible versions for other tools based on a base tool version.
9491
9592
Args:
96-
base_tool: Name of the base tool (usually "wasm-tools")
97-
base_version: Version of the base tool
93+
base_tool: The name of the base tool (usually "wasm-tools").
94+
base_version: The version of the base tool.
9895
9996
Returns:
100-
Dict: Mapping of tool names to list of compatible versions
101-
Empty dict if no compatibility info available
97+
A dict mapping tool names to lists of compatible versions, or an empty dict if no compatibility info is available.
10298
"""
10399
if base_tool == "wasm-tools" and base_version in TOOL_COMPATIBILITY_MATRIX:
104100
return TOOL_COMPATIBILITY_MATRIX[base_version]
105101
return {}
106102

107103
def validate_tool_versions(tools_config):
108-
"""Validate that a set of tool versions are compatible
104+
"""Validates that a set of tool versions are compatible with each other.
109105
110106
Args:
111-
tools_config: Dict mapping tool names to versions
107+
tools_config: A dict mapping tool names to their versions.
112108
113109
Returns:
114-
List: List of warning messages (empty if all compatible)
110+
A list of warning messages (empty if all versions are compatible).
115111
"""
116112
warnings = []
117113

toolchains/wizer_toolchain.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
load("//checksums:registry.bzl", "get_tool_info")
44

55
WIZER_VERSIONS = {
6+
"10.0.0": {
7+
"release_date": "2025-08-27",
8+
"cargo_install": True, # Primary installation method
9+
"git_commit": "main",
10+
},
611
"9.0.0": {
712
"release_date": "2024-06-03",
813
"cargo_install": True, # Primary installation method

0 commit comments

Comments
 (0)