Replace plugin root regex with SafeDIRootScanner#203
Draft
dfed wants to merge 5 commits intodfed/per-root-outputfrom
Draft
Replace plugin root regex with SafeDIRootScanner#203dfed wants to merge 5 commits intodfed/per-root-outputfrom
dfed wants to merge 5 commits intodfed/per-root-outputfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dfed/per-root-output #203 +/- ##
======================================================
Coverage 99.91% 99.92%
======================================================
Files 37 40 +3
Lines 3501 3838 +337
======================================================
+ Hits 3498 3835 +337
Misses 3 3
🚀 New features to boost your workflow:
|
…lpers - Extract relativePath into RelativePath.swift using standardizedFileURL for consistent path resolution across CSV writing and manifest generation - Move writeInputSwiftFilesCSV and runRootScanner into SharedRootScanner.swift, symlinked only into plugins that perform scanning - Remove RootScanner.swift symlink from InstallSafeDITool (unused) - Replace force unwrap in outputFileNames with dictionary default - Fix Linux CI: add isDirectory to ScannerFixture URL construction - Document SafeDIRootScanner target purpose for non-SPM build systems Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SafeDIRootScannerexecutable that performs lexical root discovery without SwiftSyntaxSafeDIManifest.jsonplus the explicit per-root output file list before returningbuildCommandSafeDITool's manifest contract unchanged while removing regex-based root discovery and manifest writing from the plugin layerSafeDIToolTestswith the real plugin path by generating manifests through the scanner while preserving the existing input Swift -> expected output styleWhy
buildCommandis still required here for incremental performance and compatibility with build systems like Buck and Bazel, which means the plugin has to know its explicit output files up front.#202introduced the manifest contract and per-root outputs, but its plugin-side root discovery remained regex-driven.This PR keeps the fast explicit-output path while tightening the weakest part of the stack:
SafeDIToolremains the semantic source of truth for validation and code generationValidation
swift test./lint.shStack
#202