2017-08-22 2 views
6

Je suis en train d'installer un nouveau projet en utilisant le nightly-2017-08-17 instantanéCabal 2.0 requis lors de l'utilisation d'un instantané de nuit avec pile

stack new test --resolver nightly-2017-08-17 

Cependant, cela donne l'erreur suivante:

Downloading template "new-template" to create project "test" in test/ ... 
Looking for .cabal or package.yaml files to use to init the project. 
Using cabal packages: 
- test/test.cabal 

Selected resolver: nightly-2017-08-17 
Unable to parse cabal file: FromString "This package requires at least Cabal version 2.0" Nothing 

Cabal est sa dernière version:

stack setup --upgrade-cabal 
Currently installed Cabal is 2.0.0.2, newest is 2.0.0.2. I'm not upgrading Cabal. 
stack will use a sandboxed GHC it installed 
For more information on paths, see 'stack path' and 'stack exec env' 
To use this GHC and packages outside of a project, consider using: 
stack ghc, stack ghci, stack runghc, or stack exec 

N'est-ce pas la manière correcte de sélectionner cette photo instantanée wi stack ou est-ce un bug dans l'outil?

Répondre

8

Le format de fichier de Cabal a changé dans la version 2.0 (probablement à cause du sac à dos). Vous devez utiliser la version Stack> = 1.5.1 qui contourne cette erreur. Un correctif approprié pour cela sera probablement publié dans la prochaine version de Stack. IIRC, le correctif est déjà dans le brach maître de la pile - donc la mise à niveau via --source-only fonctionnera aussi pour vous.

Vous pouvez lire le changelog ici pour plus d'informations à propos de cela.