Skip to content

feat: enhance database deduplication with symlink support#336

Merged
MaatheusGois merged 1 commit intoDebugSwift:mainfrom
xinnjie:feature/private-deduplicate-database-files
Apr 13, 2026
Merged

feat: enhance database deduplication with symlink support#336
MaatheusGois merged 1 commit intoDebugSwift:mainfrom
xinnjie:feature/private-deduplicate-database-files

Conversation

@xinnjie
Copy link
Copy Markdown
Contributor

@xinnjie xinnjie commented Apr 13, 2026

Changes

  • Feature: Added support for resolving symbolic links using resolvingSymlinksInPath() during database file discovery. This ensures that symbolic links and their target files are correctly identified as duplicates.
  • Testing: Added a new test suite (DatabaseFileManagerTests.swift) that creates real files and symbolic links in the iOS Simulator's directories to verify the deduplication logic indirectly.

Verification

  • Successfully ran the integration tests on an iOS 16.2 simulator using xcodebuild.
  • Verified that discoverDatabaseFiles() properly deduplicates files even when different paths (symbolic links) point to the same physical file.
    Before:
image

After:
image

… encapsulation

- Added support for resolving symbolic links using resolvingSymlinksInPath() to ensure accurate deduplication of database files.
- Encapsulated deduplicateDatabaseFiles as a private implementation detail.
- Introduced a new integration test suite to verify the deduplication logic in a real iOS Simulator environment.
@xinnjie xinnjie force-pushed the feature/private-deduplicate-database-files branch from d3d9f46 to 1a8b95b Compare April 13, 2026 03:10
@xinnjie xinnjie changed the title refactor: make deduplicateDatabaseFiles private and improve deduplication logic feat: enhance database deduplication with symlink support and private encapsulation Apr 13, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 13, 2026

Warnings
⚠️ Please assign yourself to the PR.
Messages
📖 Project coverage: 50.8%
📖 The PR added 101 and removed 2 lines. 2 file(s) changed.

ExampleTests.xctest: Coverage: 96.96

File Coverage
DatabaseFileManagerTests.swift 92.41%

Generated by 🚫 Danger Swift against 1a8b95b

@xinnjie xinnjie changed the title feat: enhance database deduplication with symlink support and private encapsulation feat: enhance database deduplication with symlink support Apr 13, 2026
@MaatheusGois MaatheusGois merged commit 48f1824 into DebugSwift:main Apr 13, 2026
2 checks passed
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.

2 participants