Skip to content

TX-APP1C: extract local-path dependency redirection — Package.Manifest.Clause + Package.Manifest.Redirection - #8

Merged
swift-institute-bot[bot] merged 1 commit into
mainfrom
tx-app1c-manifest-redirection
Aug 8, 2026
Merged

TX-APP1C: extract local-path dependency redirection — Package.Manifest.Clause + Package.Manifest.Redirection#8
swift-institute-bot[bot] merged 1 commit into
mainfrom
tx-app1c-manifest-redirection

Conversation

@coenttb

@coenttb coenttb commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

TX-APP1C — extract local-path dependency redirection (destination side)

Record: #7 (Goal swift-institute/.github#145; TX-G1 swift-institute/.github#85 comment 5217978427).

Moves the URL-clause -> .package(path:) rewrite with byte-for-byte restore out of the Institute Application's Composition area into its semantic owner:

  • Package.Manifest.Clause — locating .package(...) clauses over raw manifest bytes (paren-matched, string-literal aware), verbatim clause text and byte range, url/path extraction, SwiftPM identity derivation, byte-exact replacement.
  • Package.Manifest.Redirection — the pure source-to-source operations: redirect(_:dependency:to:) producing a Rewrite (rewritten source + verbatim declared clause + planned clause) and restore(_:planned:declared:) returning the declared clause byte-for-byte.
  • Package.Manifest.Redirection.Rewrite, Package.Manifest.Redirection.Error — result and typed failure.

Org-layout resolution, checkout discovery, and the reversal ledger stay in the Application core, which will consume this unit and delete its in-Application copy in a companion PR (negative control).

Tests: the Clause suite is moved from the Application; the Redirection suite adds redirect/restore round-trip (byte-identical), identity-based matching, and both refusal edges.

One adaptation over the moved source: UInt8(ascii:) call sites are disambiguated with explicit Unicode.Scalar literals because this module set also sees ASCII_Primitives' UInt8.init?(ascii: Character).

…n — the URL-clause -> .package(path:) rewrite with byte-for-byte restore

Extracted from the Institute Application's Composition area; org-layout
resolution and the reversal ledger stay with the Application, which will
consume this unit and delete its copy in a companion PR.

Record: #7 (Goal swift-institute/.github#145).

@swift-institute-bot swift-institute-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TX-APP1C destination extraction: build/test/lint green locally; hosted run 31234308761 conclusion SUCCESS (ci-ok pass). Approving per bot-approval flow.

@swift-institute-bot
swift-institute-bot Bot merged commit 1a75898 into main Aug 8, 2026
22 of 23 checks passed
@swift-institute-bot
swift-institute-bot Bot deleted the tx-app1c-manifest-redirection branch August 8, 2026 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant