Migrating to v2¶
v2 is not scheduled yet. This page collects the changes that are already decided, so projects and providers can prepare for them while v1 keeps working unchanged. The list may still change: items can be dropped or rescheduled, and new ones can appear here as they are decided. Every item below is visible in v1 today as a warning, a deprecation notice, or an opt-in flag.
Why link paths name the module¶
The change that started this page is the naming convention for module provider link directories, and the reasoning behind it applies to the rest of the list.
A Python distribution and its importable module are two independent names:
[project].name in pyproject.toml is the label the package is published
under, and the module name is what you import. They usually agree, and nothing
in the packaging ecosystem enforces that they do. An org publishing the same
provider under its own prefix (acme-devkit-workspace vs
hotdogwerx-devkit-workspace) needs them to disagree: the module stays
devkit.workspace for every consumer, while the distribution name carries the
org.
Repolish originally named the link directory after the distribution. That was an assumption, not a decision: it worked only while the two names happened to match, and it broke the moment an org prefix appeared. v1 now acknowledges the convention explicitly:
- generated headers name the module that generated the file
(
generated by devkit.workspace@0.1.0), because the module is the identity a reader wants regardless of which distribution installed it - link directories follow the same canon, with
.and_normalized to-(devkit.workspacelinks as.repolish/devkit-workspace/)
v1 lets you opt in with the project-level module_links: true flag. When the
flag is off, repolish compares the two names first: a distribution that already
normalizes to the module name produces the same directory either way, so the
config is left in peace. Only when the names diverge does repolish warn
(module_links_distribution_naming) and encourage the switch, because those are
the setups with something to migrate.
In v2 the convention is enforced instead of assumed: module_links goes away
and module naming is the unconditional default. See the
resource linker page for the linking mechanics
and the config file reference for the
flag.
Decided changes¶
Link directories: module naming unconditional¶
The module_links flag is removed; module providers always link under
.repolish/<module-name>/ with . and _ normalized to -. What to do now:
- If your distribution name already matches the module name (common for packages that are not published to PyPI), nothing changes for you. The two settings produce the same directory.
- If the names diverge, set
module_links: truein yourrepolish.yamland update any paths that reference.repolish/by hand (mise task includes, install guides, provider docs).
Provider registration: cli: removed¶
The cli: config entry and the generated link CLI go away. Providers register
with module: alone, and the config shorthand (providers: {alias: <string>})
must name an importable module. v1 already warns
(provider_shorthand_cli_fallback) when the shorthand falls back to a command.
What to do now:
- Convert
cli:entries tomodule:. The registration protocol is identical, so symlinks, copies, and auto-discovery work the same. - Providers stop shipping a link CLI;
repolish scaffoldstops generating one.
Directive grammar: dash spelling removed¶
The legacy repolish-<command> spelling is removed; the grammar keeps the colon
form only (repolish:<command>). v1 already warns when a template uses the dash
form. What to do now: replace repolish-regex and friends with repolish:regex
in your templates. See the grammar reference.
Provider config: legacy fields removed¶
The top-level context_merge, context_dotted, and anchors fields on a
provider entry are removed in favor of the consolidated overrides field. v1
already emits DeprecationWarning when they are used. What to do now:
Inputs: strict BaseInputs¶
Provider inputs participate in cross-provider routing, which today matches
payloads by schema because dynamically loaded providers can define their own
BaseInputs identity. v2 requires emitted inputs to subclass the shared
repolish.BaseInputs. What to do now: import the base from repolish instead of
defining your own.
Under consideration¶
These are candidates, not decisions:
- Pruning orphaned link directories when a provider's link name changes (v1 leaves the old symlink behind; remove it by hand after a rename).
Preparing a checklist for your project¶
- Run
repolish linkandrepolish applyand read every warning: each one maps to a section above. - Replace dash-spelled directives with colon-spelled ones in your templates.
- Move deprecated provider config fields under
overrides. - Set
module_links: trueif a warning names a diverging distribution name, and update hand-referenced.repolish/paths. - Convert any
cli:providers tomodule:.