Docs: flag additionalDirectoriesToInclude as SPM-Xcode only#289
Conversation
The flag walks directories at SafeDITool runtime, which the SPM
build-tool plugin under Xcode allows but the Bazel and Tuist
integrations don't — both enumerate every input up front (Bazel via
declared rule inputs; Tuist via the build phase's `inputPaths`), so
files reached only through `additionalDirectoriesToInclude` won't be
visible at build time and won't trigger incremental rebuilds.
Surface the limitation in three spots:
- `Sources/SafeDI/Decorators/SafeDIConfiguration.swift` parameter doc
- `Documentation/Manual.md` — the `additionalDirectoriesToInclude`
prose section gets a callout note
- `Documentation/Manual.md` — the `#SafeDIConfiguration` parameter
list updates to match
The existing language ("only applies to SafeDI repos that utilize
the SPM plugin via an Xcode project") was already a negative claim
about Bazel/Tuist by implication, but readers won't reliably make
that leap. Calling out both integrations by name makes the
incompatibility actionable.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@codex review |
…esToInclude Earlier copy said the flag is "only honored by the SPM build-tool plugin running inside an Xcode project" — that's wrong. The flag is honored by the SPM build-tool plugin in any context (`swift build` on the CLI, Xcode building an SPM package, etc.). The relevant distinction is "SPM build-tool plugin" vs "different build system", not "Xcode" vs "not Xcode". Bazel and Tuist still don't honor it, since they invoke SafeDITool via their own input-enumeration models rather than going through the SPM plugin.
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
"the SPM build-tool plugin" already covers every context where the flag is honored — `swift build`, Xcode-of-an-SPM-package, and Xcode- of-an-Xcodeproj-with-an-SPM-dependency-via-the-plugin all route through the same plugin. The parenthetical was incomplete (omitted the third case) and noisy.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b76925d9d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #289 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 41 41
Lines 7043 7043
=========================================
Hits 7043 7043 🚀 New features to boost your workflow:
|
Summary
Adds a callout to
#SafeDIConfiguration's docs noting thatadditionalDirectoriesToIncludeis incompatible with the Bazel and Tuist integrations.Why
The flag walks directories at SafeDITool runtime. The SPM build-tool plugin under Xcode allows that, but Bazel and Tuist enumerate every input up front (Bazel via declared rule inputs; Tuist via the build phase's
inputPaths). Files reached only throughadditionalDirectoriesToIncludeend up invisible at build time and don't trigger incremental rebuilds.The existing language ("only applies to SafeDI repos that utilize the SPM plugin via an Xcode project") was already a negative claim about Bazel/Tuist by implication, but readers won't reliably make that leap. Calling out both integrations by name makes the incompatibility actionable.
What changes
Sources/SafeDI/Decorators/SafeDIConfiguration.swift— parameter doc.Documentation/Manual.md—additionalDirectoriesToIncludeprose gets a> Notecallout.Documentation/Manual.md—#SafeDIConfigurationparameter list updated to match.Test plan
./CLI/lint.shclean.🤖 Generated with Claude Code