Quoted component names containing spaces are impossible to refer to
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- haskell
- Ambito
- build-system
Direzione di ricerca
Inizia con la riproduzione collegata di quote-component-name-repr e traccia il modo in cui Cabal analizza i nomi dei componenti nelle sezioni library, executable e test, inclusi build-depends e i riferimenti CLI. La correzione è completa quando i nomi tra virgolette contenenti spazi producono un errore di parsing bloccante, con un test di regressione che copra i casi segnalati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Haskell
- Stelle
- 1.8k
- Fork
- 766
- Merge medio
- 5g 21h
- PR unite (30g)
- 27
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un 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/cabal
-
needs triage type: enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 3 giorni
-
needs triage type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
haskell/cabal#12568 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
needs triage type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
haskell/cabal#12525 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 3 giorni
-
Required version of `cabal-install` to build CabalForse già presa @philderbeast l’ha presa 24 giorni fa. Apertadocumentation type: discussion
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
haskell/cabal#12477 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
Document which are our LTS releasesForse già presa @KeuqS l’ha presa 41 giorni fa. Apertadocumentation type: discussion
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
haskell/cabal#12373 · 2 commenti ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di haskell/cabal
Issue simili
-
bug desktop
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
simplex-chat/simplex-chat#8291 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: C# programs with top-level statements fail to compileForse già presa @AsyncNigam l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
compiler-explorer/compiler-explorer#9625 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
reflex-0.10Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
commercialhaskell/stackage#8180 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenZeppelin/canton-contracts#140 ·
I maintainer di solito rispondono entro 1 giorno
-
takeInterval yields nothing, dropInterval drops nothingForse già presa @GuillaumedeVolpiano l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
composewell/streamly#3271 ·