`tests\haddock-options` from GHC 9.6.6 to GHC 9.8.4: changed behaviour, why?

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
haskell

調査の方向性

tests\integration\tests\haddock-options\files から始め、GHC 9.6.6 と 9.8.4 で報告された stack haddock --haddock-arguments --optghc=-DBAR の挙動を再現します。生成されたコマンドと Haddock の結果を比較し、そのうえで原因と、統合テストで想定されている失敗を変更する必要があるかどうかを明らかにします。

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

説明

component: haddock resolution: upstream issue type: question

Moving from GHC 9.6.6 (LTS 22.43, Cabal-3.10.3.0 and haddock --version 2.29.2) to GHC 9.8.4 (LTS 23.0, Cabal-3.10.3.0 and haddock --version 2.30.0) the integration test haddock-options changed its behaviour, in that haddock -haddock-arguments --optghc=-DBAR failed to fail.

With tests\integration\tests\haddock-options\files as the working directory and LTS 22.43 (extracts, reformatted):

❯ stack --snapshot lts-22.43 haddock --haddock-arguments --optghc=-DBAR
haddock-options> configure (lib)
...
haddock-options> haddock
Preprocessing library for haddock-options-0.1.0.0..
Running Haddock on library for haddock-options-0.1.0.0..
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: base-4.18.2.1, ghc-bignum-1.3,
ghc-prim-0.10.0

src\Lib.hs:10:2: error:  error: FOO and BAR is defined
   |
10 | #error FOO and BAR is defined
   |  ^
#error FOO and BAR is defined
 ^
1 error generated.

src\Lib.hs:1:1: error:
    `clang.exe' failed in phase `C pre-processor'. (Exit code: 1)
  |
1 | {-# LANGUAGE CPP #-}
  | ^

Error: [S-7282]
       Stack failed to execute the build plan.

       While executing the build plan, Stack encountered the error:

       [S-7011]
       While building package haddock-options-0.1.0.0 (scroll up to its section to see the error) using:
       D:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_O_vy6YIf_3.10.3.0_ghc-9.6.6.exe 
       --verbose=1 
       --builddir=.stack-work\dist\effaccc7 
       haddock 
       --html 
       --hoogle 
       --html-location=../$pkg-$version/ 
       --haddock-option=--hyperlinked-source 
       --haddock-option=--quickjump 
       --haddock-option=--optghc=-DBAR 
       --haddock-option=--optghc=-DFOO
       Process exited with code: ExitFailure 1

and (LTS 23.0) (extracts):

❯ stack haddock --haddock-arguments --optghc=-DBAR
haddock-options> configure (lib)
...
haddock-options> haddock
Preprocessing library for haddock-options-0.1.0.0..
Warning: The documentation for the following packages are not installed. No
Running Haddock on library for haddock-options-0.1.0.0..
links will be generated to these packages: base-4.19.2.0, ghc-bignum-1.3,
ghc-prim-0.11.0

src\Lib.hs:10:2: error:  error: FOO and BAR is defined
   |
10 | #error FOO and BAR is defined
   |  ^
#error FOO and BAR is defined
 ^
1 error generated.
Haddock coverage:
haddock: Unable to find a package providing module <no-mod>, skipping Hoogle.

         Perhaps try specifying the desired package explicitly using the --package-name
         and --package-version arguments.

Documentation created: .stack-work\dist\f24b2e15\doc\html\haddock-options\,
.stack-work\dist\f24b2e15\doc\html\haddock-options\haddock-options.txt
haddock-options> copy/register
Installing library in ...\.stack-work\install\854890af\lib\x86_64-windows-ghc-9.8.4\haddock-options-0.1.0.0-CuGz8FXsCXtFtA73xMP0Gw
Registering library for haddock-options-0.1.0.0..
Updating Haddock index for project packages in:
...\.stack-work\install\854890af\doc\index.html
Updating Haddock index for project packages and dependencies in:
...\.stack-work\install\854890af\doc\all\index.html

where, before copy/register (using --verbose):

Process finished in 6572ms: D:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_O_vy6YIf_3.10.3.0_ghc-9.8.4.exe 
--verbose=1 
--builddir=.stack-work\dist\f24b2e15 
haddock 
--html 
--hoogle 
--html-location=../$pkg-$version/ 
--haddock-option=--hyperlinked-source 
--haddock-option=--quickjump 
--haddock-option=--optghc=-DBAR 
--haddock-option=--optghc=-DFOO

The haddock command is unchanged, so it seems likely a change in the behaviour of the haddock executable.

主要言語
Haskell
スター
4.1k
フォーク
857
平均マージ
17時間 32分
マージ済み PR(30日)
5

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

commercialhaskell/stack のほかの issue

commercialhaskell/stack の issue をすべて見る

似ている issue

Haskell の issue をもっと見る

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

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