Loading a file under test-suite fails when importing library
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia con il percorso di caricamento C-c C-l e riproduci il problema con test/Main.hs e l’importazione di QuickCheck; segui come la diagnostica del pacchetto nascosto diventa un suggerimento di dipendenza. Il lavoro è completato quando il contesto della test-suite viene gestito senza la richiesta falsa, oppure quando un avviso esplicito relativo a una funzionalità non supportata sopprime i suggerimenti di modifica, e il riproduttore fornito non rimane più bloccato in attesa di una risposta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When I load a file from a test-suite, I am getting suggestions to add dependencies to the cabal file that are already listed as dependencies in the test-suite.
Reproducer:
mkdir foo
cd foo
cabal init -n --lib --tests
We now add dependency QuickCheck to the testsuite.
echo " , QuickCheck" >> *.cabal
In Emacs,
- load
test/Main.hs - add line
import Test.QuickCheck - load the file into the haskell-mode with
C-c C-l
This will suggest "Add QuickCheck to foo.cabal? (y or n)" and block until an answer is given. (Of course, we do not want to add anything to our cabal file because it is perfectly ok.)
The suggestion seems to be harvested from the error:
Could not load module ‘Test.QuickCheck’.
It is a member of the hidden package ‘QuickCheck-2.14.3’.
Perhaps you need to add ‘QuickCheck’ to the build-depends in your .cabal file.
haskell-mode seems to load the file in the wrong context.
- I suspect loading files from test-suites is not supported yet. It would be good if the haskell-mode would warn about the missing feature (and then not making any suggestions on code modification) rather than blindly doing wrong things.
- The helpful suggestions by haskell-mode are well-meant, but rather disruptive when they are just garbage, which seems to happen in different scenarios (cf. #1834).
Note: there is a previous instance of this issue that the author closed, but there is no evidence it was fixed:
- #1535
- Lingua principale
- Emacs Lisp
- Stelle
- 1.4k
- Fork
- 357
- Merge medio
- 7h 50m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di haskell/haskell-mode
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
haskell/haskell-mode#1889 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
haskell/haskell-mode#1522 ·
-
haskell-indentation: identifier named `signature` breaks indentation for the rest of the declarationForse già presa @PerryLink l’ha presa 48 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
haskell/haskell-mode#1895 ·
-
.hsc/CPP Can't find headers.Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
haskell/haskell-mode#1892 ·
-
Need help with haskell-modeAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
haskell/haskell-mode#1890 ·
Tutte le issue di haskell/haskell-mode
Issue simili
-
area: middleware enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
rohitgollarahalli/mcpx#45 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
facebookresearch/atlas-lean#20218 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100