Quoted component names containing spaces are impossible to refer to
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 58/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- haskell
- 領域
- build-system
調査の方向性
リンクされた quote-component-name-repr の再現から始め、Cabal が library、executable、test セクションでコンポーネント名をどのように解析するかを、build-depends と CLI 参照も含めて追跡します。引用符で囲まれたスペースを含む名前が致命的なパースエラーを生成し、報告されたケースをカバーする回帰テストがある状態で修正完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
In the library, executable or test section it is possible to define a library with name within quotes.
By quoting the name, the library name can contain spaces.
When a library name contains spaces, it is impossible to refer to it in a build-depends fields because quotes are not allowed.
It is also impossible to refer to it in the CLI.
Cabal doesn't stop the user from quoting component name, nor from putting spaces.
There are in total only roughly 78 cabal files that does this on Hackage.
To Reproduce
Steps to reproduce the behavior:
- Go to the repository https://github.com/leana8959/cabal-quote-component-name-repr
- See the steps to reproduce the error.
TL;DR:
-
Add a trailing space to my-lib, and you won't be able to refer to it in the executable.
It is not possible to put quotes in thebuild-dependsfield.Building the executable when the executable doesn't depend on the library would work.
There's no hard parse error. -
Add a trailing space to my-exe, and the executable will have a space in its name.
Here's a silly example:
Preprocessing library 'my-lib' for quote-component-name-repr-0.1.0.0... Building library 'my-lib' for quote-component-name-repr-0.1.0.0... Configuring executable '" m y - e x e "' for quote-component-name-repr-0.1.0.0... Preprocessing executable '" m y - e x e "' for quote-component-name-repr-0.1.0.0... Building executable '" m y - e x e "' for quote-component-name-repr-0.1.0.0... [1 of 1] Compiling Main [2 of 2] Linking dist-newstyle/build/x86_64-linux/ghc-9.10.3/quote-component-name-repr-0.1.0.0/x/" m y - e x e "/build/ m y - e x e / m y - e x e
Expected behavior
Quotes in component names should be a hard parse error.
System information
- Operating system: NixOS 26.05
cabal: 10aed4eb5e3149cd25f162fd2b0def06347baa66,- ghc: 9.10.3 from nixpkgs
Additional context
Add any other context about the problem here.
- 主要言語
- Haskell
- スター
- 1.8k
- フォーク
- 766
- 平均マージ
- 5日 21時間
- マージ済み PR(30日)
- 27
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
haskell/cabal のほかの issue
-
needs triage type: enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 3 日以内に返信
-
needs triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
haskell/cabal#12568 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
needs triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
haskell/cabal#12525 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 3 日以内に返信
-
Required version of `cabal-install` to build Cabal対応中かも @philderbeast が 24 日前に担当しました。 オープンdocumentation type: discussion
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
haskell/cabal#12477 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
Document which are our LTS releases対応中かも @KeuqS が 41 日前に担当しました。 オープンdocumentation type: discussion
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
haskell/cabal#12373 · コメント 2 件 ·
メンテナーはふだん 3 日以内に返信
似ている issue
-
bug desktop
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
simplex-chat/simplex-chat#8291 ·
メンテナーはふだん 1 日以内に返信
-
[BUG]: C# programs with top-level statements fail to compile対応中かも @AsyncNigam が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
compiler-explorer/compiler-explorer#9625 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
reflex-0.10オープン
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
commercialhaskell/stackage#8180 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OpenZeppelin/canton-contracts#140 ·
メンテナーはふだん 1 日以内に返信
-
takeInterval yields nothing, dropInterval drops nothing対応中かも @GuillaumedeVolpiano が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
composewell/streamly#3271 ·