Inspection tests fail if -O0 is forced

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

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

評価

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

調査の方向性

cabal run test:tests --ghc-options='-O0' -- --hide-successes で再現します。まず folds-unfolds の検査失敗と lowlevel の misc チェックから始め、提供されているテストフィルターを使ってそれらを切り分けます。完了の条件は、これらの失敗なしに、suite が強制された -O0 を適切に処理できることです。

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

説明

Hackage builder for some reason enforces -O0, which causes inspection tests to fail:

$ cabal run test:tests --ghc-options='-O0' -- --hide-successes
All
  Properties
    folds-unfolds
      folds
        _S_foldl'_from_foldlM' ==~ _S_foldl':                              FAIL
          LHS:
              _S_foldl'_from_foldlM'
                = ... \ (f :: a -> Char -> a) (x :: a) ->
                        . runIdentity
                          (foldlM'
                             $fMonadIdentity
                             ((\ (i :: a) (c :: Char) -> f i c) `cast` <Co:9> :: ...)
                             x)
          RHS: _S_foldl' = ... inline foldl'
          Use -p '/_S_foldl'\''_from_foldlM'\'' ==~ _S_foldl'\''/' to rerun this test only.
    lowlevel
      misc
        t_literal_foo
          mentions none of Char, List:                                     FAIL
            t_literal_foo :: Text
            t_literal_foo = pack lvl_sNbt

            lvl_sNbs :: Addr#
            lvl_sNbs = "foo"#

            lvl_sNbt :: [Char]
            lvl_sNbt = unpackCString# lvl_sNbs

            Use -p '/mentions none of Char, List/' to rerun this test only.
          uses none of pack, unstream, map, safe, streamList:              FAIL
            t_literal_foo :: Text
            t_literal_foo = pack lvl_sNbt

            lvl_sNbs :: Addr#
            lvl_sNbs = "foo"#

            lvl_sNbt :: [Char]
            lvl_sNbt = unpackCString# lvl_sNbs

            Use -p '/uses none of pack, unstream, map, safe, streamList/' to rerun this test only.
          uses none of unpackCString#, unpackCStringUtf8#:                 FAIL
            t_literal_foo :: Text
            t_literal_foo = pack lvl_sNbt

            lvl_sNbs :: Addr#
            lvl_sNbs = "foo"#

            lvl_sNbt :: [Char]
            lvl_sNbt = unpackCString# lvl_sNbs

            Use -p '/uses none of unpackCString#, unpackCStringUtf8#/' to rerun this test only.

...which is kinda expected, but annoying.

In the wild: https://hackage.haskell.org/package/text-2.1.2/reports/2

主要言語
Haskell
スター
424
フォーク
167
平均マージ
1日 21時間
マージ済み PR(30日)
6

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

haskell/text のほかの issue

haskell/text の issue をすべて見る

似ている issue

Haskell の issue をもっと見る

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

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