Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Conditional dependencies break PackLib.Planner

オープン
#154 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
swift
領域
build-system

調査の方向性

Start by reading Sources/PackLib/Planner.swift at lines 435–437, then reproduce with swift-structured-queries v0.11.0 as described. Check how the disabled StructuredQueriesTagged trait affects dependency resolution; done means Planner no longer tries to resolve Tagged when that trait is disabled.

索引モデルが issue の本文から書いたものです。

説明

bug

Description

When using a package that has conditionally-included dependencies (such as dependencies that are pulled in iff a Package Trait is enabled), Planner will try to resolve them unconditionally. If the dependency isn't actually pulled in by SwiftPM, then, Planner will fail here:

https://github.com/xtool-org/xtool/blob/836fca8dafac6b0c5b3ff1060c41b4c88883d54e/Sources/PackLib/Planner.swift#L435-L437

To repro: try adding a dependency on https://github.com/pointfreeco/swift-structured-queries @ v0.11.0. We end up with the error Could not find package containing product 'Tagged', because Planner doesn't know that the Tagged dependency is only required when the StructuredQueriesTagged trait is enabled (and in this case the trait is disabled.)

Environment

Host OS: Ubuntu 24.04.3 LTS
Swift version: swift-6.1-RELEASE
SDK version: iOS 18.5

主要言語
Swift
スター
5.5k
フォーク
163
平均マージ
18時間 29分
マージ済み PR(30日)
27

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

xtool-org/xtool のほかの issue

xtool-org/xtool の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。