Unexpected argument when using `swift package plugin generate-manual <tool>`

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
swift
領域
cli

調査の方向性

generate-manual Swift package plugin のエントリポイントから始め、報告されている Swift と ArgumentParser のバージョンを使ってコマンド swift package plugin generate-manual tuist --configuration debug を再現します。宣言されている <tool> 引数とプラグインに渡される引数を比較し、予期しない引数エラーなしでコマンドが完了することを確認して修正を検証します。

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

説明

I'm trying to use the generate-manual plugin in this repository by using the following command: swift package plugin generate-manual tuist --configuration debug. However, the command fails with an error Error: Unexpected argument 'tuist'. It seems that the argument parsing logic is unable to recognize the tool argument, even though it's defined in it and shows up in the help menu.

ArgumentParser version: 1.4.0
Swift version:

swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0
Checklist
  • If possible, I've reproduced the issue using the main branch of this package (commit: bb10ca8b70fe54c67a1b3adb0f5d58341dc2ed7b)
  • I've searched for existing GitHub issues
Steps to Reproduce

Clone the this repository and run the command swift package plugin generate-manual tuist --configuration debug.

Expected behavior

I'd expect the command to complete successfully.

Actual behavior

You get the following error:

Built package in debug mode
Generating manual for tuist...
Error: Unexpected argument 'tuist'
Usage: generate-manual <tool> [--multi-page] [--date <date>] [--section <section>] [--authors <authors> ...] --output-directory <output-directory>
  See 'generate-manual --help' for more information.
error: 'generate-manual' invocation failed: ''generate-manual' invocation failed with a nonzero exit code: '64'.'
主要言語
Swift
スター
3.8k
フォーク
436
平均マージ
4日 11時間
マージ済み PR(30日)
2

環境構築

はじめの一歩

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

apple/swift-argument-parser のほかの issue

apple/swift-argument-parser の issue をすべて見る

似ている issue

Swift の issue をもっと見る

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

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