skillshare icon indicating copy to clipboard operation
skillshare copied to clipboard

Preserved project links during adopt resync

Open TIR44 opened this issue 6 months ago • 1 comments

Summary

  • Passed the project root through the shared adopt apply path before re-syncing targets.
  • Kept project-mode symlink and merge target re-sync on the existing relative-link behavior instead of falling back to absolute links.
  • Updated the project adopt integration assertion to resolve symlink targets across macOS /private/var canonicalization and to catch absolute project links on non-Windows platforms.

Context

Follow-up to #181. The failing macOS integration job showed TestAdoptProject_MigratesAndResyncs comparing a canonical /private/var/... symlink target against the logical temp path. While checking that, I found the re-sync path was passing an empty project root, so project-mode adopt created absolute links instead of the portable relative links used by normal project sync.

Tests

  • go build -o bin/skillshare ./cmd/skillshare
  • SKILLSHARE_TEST_BINARY=$PWD/bin/skillshare go test -v -race ./tests/integration -run '^TestAdoptProject_MigratesAndResyncs$' -count=1
  • go test ./internal/adopt ./cmd/skillshare -run 'TestApply_ReSyncHonorsCopyMode|TestAdopt' -count=1
  • make test-unit

TIR44 avatar May 31 '26 14:05 TIR44

Addressed the EvalSymlinks error handling review note in 0baecf2. Re-ran the targeted macOS-relevant integration test locally:

SKILLSHARE_TEST_BINARY=$PWD/bin/skillshare go test -v -race ./tests/integration -run '^TestAdoptProject_MigratesAndResyncs$' -count=1

TIR44 avatar May 31 '26 14:05 TIR44