- Language mode
- 6.0
- Product
- Not released
Confirm the language mode
Use a working copy of your 5.21 source and the 6.0 development CLI. Run topaz version - and look for Language mode: topaz-.
For commands with a language option, the flag is spelled -. The migration uses - to select the source and destination editions.
Preview the edits
For a source file and its imports, run topaz migrate main.. For a package, run topaz migrate - from the directory containing topaz.. Use - to select another package directory.
The preview lists changed files and the original byte ranges for proposed edits. It leaves your files untouched. In the complete preview example, the tool adds parentheses around the condition of an if.
Review what needs manual work
The automatic source edits add parentheses to control expressions where needed. In package mode, the tool can also update [package]. and the std dependency to 6.. If it changes the manifest and topaz. exists, it regenerates the lock.
The tool reports dependencies other than std and the [extern] and [lispex] sections as manual work. A destination diagnostic can also block the migration. Review the reported locations and complete the required changes by hand.
See language changes from 5.21 to 6.0 for manual fixes and changes in execution results to review even after a successful check.
Apply and recover
After reviewing a successful preview, run the same command with -. Apply requires a complete 6.0 check and unchanged inputs. An incomplete check exits with code 3 before any edits are applied.
Apply updates files at their original paths. Before writing changes, the tool records before and after hashes in .. It tracks progress in the adjacent journal directory. If apply is interrupted, keep these records and repeat the original command with -. The tool checks the recorded hashes before applying the remaining edits.
After applying or making manual edits, check the result with topaz check main. for a standalone entry or topaz check from the package directory.