Inspection tests fail if -O0 is forced

Aperta
#634 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
haskell
Ambito
testing-qa

Direzione di ricerca

Riproduci con cabal run test:tests --ghc-options='-O0' -- --hide-successes. Inizia con il fallimento dell’ispezione folds-unfolds e i controlli misc di lowlevel, usando i filtri di test forniti per isolarli. Il lavoro è completato quando la suite gestisce correttamente -O0 forzato senza questi errori.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Haskell
Stelle
424
Fork
167
Merge medio
1g 21h
PR unite (30g)
6

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di haskell/text

Tutte le issue di haskell/text

Issue simili

Altre issue su Haskell

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.