- Language mode
- 6.0
- Product
- Not released
Invocation, options and results
topaz migrate
topaz migrate [entry] [options]
Availability
Included by default · yes
This command is available in the 6.0 runner.
This command is available in the 6.0 runner.
Input
entry is optional.
Options and conflicts
| Option | Default | Contract | Conflicts |
|---|---|---|---|
--root <dir> | Not specified | module-system root; the entry must be under it. With no entry it selects the package directory | None listed |
--from 5.21 | Not specified | Select a local registry directory for vendor or the source edition for migrate. | None listed |
--to 6.0 | Not specified | Select the destination language edition. | None listed |
--apply | Not specified | Apply a completely checked migration. | None listed |
Output channels
stdout
stderr
Exit status
Effects
The default preview writes no files. - publishes the prepared changes together only when there is no manual work, the destination passes a complete 6.0 check, and the original inputs are unchanged. A check that cannot finish exits 3 without applying changes.
This command is available in the 6.0 runner.
Operation
Use -. With an entry, migrate its source graph. Without an entry, use the package selected by - or the current directory. The command proposes deterministic syntax edits and identifies manual work by file and byte range.
Example contract
Example contract
The invocation topaz migrate main. is expected to exit with 0.
The preview identifies the original byte range of the control input. It leaves the file unchanged.
Example
Preview 5.21 migration edits
if true { () }
main.tpz
[3, 7)
Migration would change 1 file(s).
Expected result
Expected result
Checking accepts the program. Exit code 0.
main.tpz[3, 7)Migration would change 1 file(s).
The preview identifies the original byte range of the control input. It leaves the file unchanged.