본문으로 건너뛰기
토파즈문서
6.05.21

문서 검색

명세 6.0

방향키로 결과를 고르고 Enter를 눌러 여세요.

API 이름, 진단 번호, 규칙 또는 프로젝트 주제를 입력하세요.

    다운로드

    도구

    migrate

    Preview or apply source edits from Topaz 5.21 to Topaz 6.0.

    언어 모드
    6.0
    제품
    출시되지 않음

    Invocation, options and results

    topaz migrate

    호출 형식
    1. topaz migrate [entry] [options]

    사용 조건

    기본 포함 · 예

    This command is available in the 6.0 runner.

    This command is available in the 6.0 runner.

    입력

    entry is optional.

    옵션과 충돌

    옵션기본값계약충돌
    --root <dir>미지정

    module-system root; the entry must be under it. With no entry it selects the package directory

    없음
    --from 5.21미지정

    Select a local registry directory for vendor or the source edition for migrate.

    없음
    --to 6.0미지정

    Select the destination language edition.

    없음
    --apply미지정

    Apply a completely checked migration.

    없음

    출력 채널

    stdout

    stderr

    종료 상태

    효과

    The default preview writes no files. --apply 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 --from 5.21 --to 6.0. With an entry, migrate its source graph. Without an entry, use the package selected by --root 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.tpz --from 5.21 --to 6.0 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

    main.tpzPreview 5.21 migration edits
    1. if true { () }
    기대 출력종료 코드 0
    main.tpz
      [3, 7)
    Migration would change 1 file(s).
    
    $ topaz migrate main.tpz --from 5.21 --to 6.0
    기대 결과

    기대 결과

    검사가 프로그램을 받아들입니다. 종료 코드 0.

    기대 표준 출력
    1. main.tpz
    2. [3, 7)
    3. Migration would change 1 file(s).

    The preview identifies the original byte range of the control input. It leaves the file unchanged.