Skip to content

fix(ci): disable SPM at CI level instead of via pubspec flag#2675

Merged
xsahil03x merged 1 commit into
masterfrom
fix/move-spm-disable-to-ci
May 20, 2026
Merged

fix(ci): disable SPM at CI level instead of via pubspec flag#2675
xsahil03x merged 1 commit into
masterfrom
fix/move-spm-disable-to-ci

Conversation

@xsahil03x
Copy link
Copy Markdown
Member

@xsahil03x xsahil03x commented May 20, 2026

Summary

  • Drop the flutter > config > enable-swift-package-manager: false key added to sample_app/pubspec.yaml in chore(samples): disable Swift Package Manager for sample_app #2672. That key was introduced in Flutter ~3.38, so it fails to parse under our legacy floor (Flutter 3.27.4 pinned by legacy_version_analyze.yml), breaking master right after chore(samples): disable Swift Package Manager for sample_app #2672 merged with:

    Unexpected child "config" found under "flutter".

  • Instead, run flutter config --no-enable-swift-package-manager in the two workflows that actually produce codesigned IPAs (distribute_internal, distribute_external) — the only place SPM signing errors bite. The PR-validation build (ios) no_codesign:true path in stream_flutter_workflow.yml doesn't need it (no signing → no SPM signing failures).

Failing master run for context: https://github.com/GetStream/stream-chat-flutter/actions/runs/26162346822

Test plan

  • legacy_version_analyze passes on this PR (sample_app's pubspec is parseable on Flutter 3.27.4 again).
  • Dispatched distribute_internal (ios) on this branch succeeds end-to-end, with the new Disable Swift Package Manager step taking effect.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chore
    • Updated iOS build configuration to ensure consistent behavior across development and distribution workflows.

Review Change Stack

The `flutter > config > enable-swift-package-manager: false` pubspec
key introduced in #2672 was only added in Flutter ~3.38, so the
sample_app's pubspec failed to parse under Flutter 3.27.4 — the
legacy floor pinned by `legacy_version_analyze.yml`. Bootstrap failed
with: Unexpected child "config" found under "flutter".

Drop the pubspec key and instead run
`flutter config --no-enable-swift-package-manager` in the two
codesigned-iOS workflows that actually need it
(distribute_internal, distribute_external). The PR-validation
`build (ios) no_codesign:true` path doesn't hit SPM signing
errors and doesn't need the disable.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

📝 Walkthrough

Walkthrough

Configuration for disabling Swift Package Manager is migrated from the sample_app/pubspec.yaml file to CLI commands executed during iOS workflow jobs. The pubspec configuration entry is removed, and identical behavior is established via flutter config commands in both the external and internal distribution workflows.

Changes

Swift Package Manager Configuration Migration

Layer / File(s) Summary
Remove SPM disable from pubspec configuration
sample_app/pubspec.yaml
The config.enable-swift-package-manager: false configuration block is removed from sample_app pubspec file.
Add SPM disable commands to iOS workflows
.github/workflows/distribute_external.yml, .github/workflows/distribute_internal.yml
Both external and internal distribution workflows add a flutter config --no-enable-swift-package-manager step to the iOS job, positioned before tool installation steps.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • GetStream/stream-chat-flutter#2672: Retrieved PR adds the enable-swift-package-manager: false configuration to sample_app/pubspec.yaml, representing the inverse change to this PR's removal of the same configuration.

Poem

🐰 A config moves from file to flow,
From pubspec's static, old-fashioned glow,
To workflows swift, where commands run free,
SPM disabled, as it ought to be! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: moving SPM disablement from pubspec configuration to CI-level commands in workflows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/move-spm-disable-to-ci

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.27%. Comparing base (abc8648) to head (6a348d5).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2675   +/-   ##
=======================================
  Coverage   65.27%   65.27%           
=======================================
  Files         423      423           
  Lines       26622    26622           
=======================================
  Hits        17377    17377           
  Misses       9245     9245           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xsahil03x xsahil03x enabled auto-merge (squash) May 20, 2026 12:52
@xsahil03x xsahil03x merged commit 6b6eb93 into master May 20, 2026
27 of 29 checks passed
@xsahil03x xsahil03x deleted the fix/move-spm-disable-to-ci branch May 20, 2026 13:09
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