Skip to content

Docs: flag additionalDirectoriesToInclude as SPM-Xcode only#289

Merged
dfed merged 3 commits intomainfrom
claude/document-additional-dirs-incompatibility
May 2, 2026
Merged

Docs: flag additionalDirectoriesToInclude as SPM-Xcode only#289
dfed merged 3 commits intomainfrom
claude/document-additional-dirs-incompatibility

Conversation

@dfed
Copy link
Copy Markdown
Owner

@dfed dfed commented May 2, 2026

Summary

Adds a callout to #SafeDIConfiguration's docs noting that additionalDirectoriesToInclude is 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 through additionalDirectoriesToInclude end 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.mdadditionalDirectoriesToInclude prose gets a > Note callout.
  • Documentation/Manual.md#SafeDIConfiguration parameter list updated to match.

Test plan

  • ./CLI/lint.sh clean.
  • DocC source still builds (no syntax change to the macro doc comment, only prose).

🤖 Generated with Claude Code

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>
@dfed
Copy link
Copy Markdown
Owner Author

dfed commented May 2, 2026

@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.
@dfed
Copy link
Copy Markdown
Owner Author

dfed commented May 2, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

ℹ️ 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".

"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.
@dfed
Copy link
Copy Markdown
Owner Author

dfed commented May 2, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread Sources/SafeDI/Decorators/SafeDIConfiguration.swift
@dfed dfed marked this pull request as ready for review May 2, 2026 05:10
@dfed dfed merged commit c2f83b4 into main May 2, 2026
18 checks passed
@dfed dfed deleted the claude/document-additional-dirs-incompatibility branch May 2, 2026 05:10
@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (353609e) to head (7b76925).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #289   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           41        41           
  Lines         7043      7043           
=========================================
  Hits          7043      7043           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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