You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
optionally override module names; bump version to 0.16.0
This adds CLI and componentize-py.toml options for overriding the generated
Python module names for one or more WIT interfaces.
By default, the name is the snake-case version of the WIT name, qualified as
necessary with the package namespace and name and/or the version in cases of
ambiguity. Sometimes that's not what you want, though, so now you can override
the naming on an individual basis as long as the name(s) you pick are unique.
This can be especially useful for backwards compatibility when adding new
versions of WIT interfaces. In that case, the generated module name may go from
unqualified to qualified, but you can now force the name of the original version
to be unqualified for compatibility. For example:
- You release an SDK with an interface called `foo:bar/baz@1.0.0`. Since that's
the only interface with the name `baz`, `componentize-py` will name the
generated module `baz` also.
- Later, you release a new version of the SDK with support for _both_
`foo:bar/baz@1.0.0` _and_ `foo:bar/baz@2.0.0`. In that case,
`componentize-py` will name the generated modules `foo_bar_baz_1_0_0` and
`foo_bar_baz_2_0_0` by default. However, you don't want to force users of
your SDK to use the new name, so you pass `--import-interface-name
foo:bar/baz@1.0.0=baz` to `componentize-py`, which tells it to use the
original name.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
0 commit comments