Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Fails with error "Failed to parse cabal sections for ... due to ParseErrorBundle {..." #22

Open
Martinsos opened this issue Sep 7, 2022 · 1 comment

Comments

@Martinsos
Copy link

Martinsos commented Sep 7, 2022

Here is cabal file for which prune-juice fails: https://github.com/wasp-lang/wasp/blob/main/waspc/waspc.cabal .

It does though report something then:

Some unused dependencies for test cli-test in package waspc
  QuickCheck
  tasty-quickcheck
Some unused dependencies for test waspc-test in package waspc
  QuickCheck
Some unused base dependencies for package waspc
  array

Here is the whole output, with error (which I formatted just a bit to make it easier to read):

Failed to parse cabal sections for ./waspc.cabal due to
  ParseErrorBundle {
    bundleErrors = TrivialError 8926 (Just (Tokens ('w' :| "a"))) (fromList [Label ('e' :| "nd of line"),Label ('w' :| "hite space")]) :| [],
    bundlePosState = PosState {
      pstateInput = "cabal-version: 2.4\n\n-- TODO:\n--  - Rename wasp-cli back to just wasp.\n--  - Manually updating exposed-modules, other-modules and data-files is tedious.\n--    Consider using hpack, or maybe even hpack-dhall.\n\nname:           waspc\nversion:        0.5.2.1\ndescription:    Please see the README on GitHub at <https://github.com/wasp-lang/wasp/waspc#readme>\nhomepage:       https://github.com/wasp-lang/wasp/waspc#readme\nbug-reports:    https://github.com/wasp-lang/wasp/issues\nauthor:         Wasp Team\nmaintainer:     [email protected]\ncopyright:      Wasp, Inc.\nlicense:        MIT\nlicense-file:   LICENSE\nbuild-type:     Simple\nextra-source-files:\n  README.md\n  ChangeLog.md\ndata-files:\n  -- NOTE: cabal has this weird rule that * doesn't capture file extension, nor can you provide just *,\n  --   it has to be followed by extension, which is why we have to manually list all of the extensions,\n  --   and also files with no extension.\n  --   Check https://github.com/haskell/cabal/issues/5883 for more details.\n  Generator/templates/Dockerfile\n  Generator/templates/dockerignore\n  Generator/templates/react-app/gitignore\n  Generator/templates/react-app/npmrc\n  Generator/templates/server/gitignore\n  Generator/templates/server/npmrc\n  Generator/templates/**/*.prisma\n  Generator/templates/**/*.toml\n  Generator/templates/**/*.json\n  Generator/templates/**/*.ico\n  Generator/templates/**/*.html\n  Generator/templates/**/*.md\n  Generator/templates/**/*.js\n  Generator/templates/**/*.css\n  Generator/templates/**/*.png\n  Cli/bash-completion\n  Cli/templates/**/*.css\n  Cli/templates/**/*.js\n  Cli/templates/**/*.png\ndata-dir: data/\n\nsource-repository head\n  type: git\n  location: https://github.com/wasp-lang/wasp\n\ncommon common-all\n  default-language: Haskell2010\n  ghc-options:\n    -Wall\n    -- -optP-Wno-nonportable-include-path avoids warning caused by .../autogen/cabal_macros.h. on OSX.\n    -optP-Wno-nonportable-include-path\n    -- -fwrite-ide-info and -hiedir=.hie tell GHC to write compile-time information about the code\n    -- to .hie directory. This information can then be used by other tools, e.g. stan (static analyzer).\n    -fwrite-ide-info -hiedir=.hie\n  default-extensions:\n    OverloadedStrings\n    TemplateHaskell\n    QuasiQuotes\n    ScopedTypeVariables\n    LambdaCase\n    FlexibleContexts\n    MultiParamTypeClasses\n    DisambiguateRecordFields\n\ncommon common-exe\n  ghc-options:\n    -threaded -rtsopts -with-rtsopts=-N\n\nlibrary\n  import: common-all\n  hs-source-dirs: src\n  build-tool-depends:\n      alex:alex\n  build-depends:\n    , base                  >= 4.7 && < 5\n    , Glob                  ^>= 0.10.2\n    , containers            ^>= 0.6.5\n    , directory             ^>= 1.3.6 && < 1.4\n    , dir-traverse          ^>= 0.2.3\n    , filepath              ^>= 1.4.2\n    , time                  ^>= 1.9.3\n    , bytestring            ^>= 0.10.12\n    , aeson                 ^>= 1.5.6\n    , aeson-pretty          ^>= 0.8\n    , text                  ^>= 1.2.4\n    , template-haskell      ^>= 2.16.0\n    , unordered-containers  ^>= 0.2.16\n    , mtl                   ^>= 2.2.2\n    , async                 ^>= 2.2.4\n    , conduit               ^>= 1.3.4\n    , exceptions            ^>= 0.10.4\n    , split                 ^>= 0.2.3\n    , conduit-extra         ^>= 1.3.5\n    , process               ^>= 1.6.13\n    , cryptohash-sha256     ^>= 0.11.102\n    , mustache              ^>= 2.3.2\n    , parsec                ^>= 3.1.14\n    , path                  ^>= 0.9.2\n    , path-io               ^>= 1.6.3\n    , regex-tdfa            ^>= 1.3.1\n    , strong-path           ^>= 1.1.4\n    , unliftio              ^>= 0.2.20\n    , utf8-string           ^>= 1.0.2\n    , cryptonite            ^>= 0.29\n    , fsnotify              ^>= 0.3.0\n    , http-conduit          ^>= 2.3.8\n    , uuid                  ^>= 1.3.15\n    -- 'array' is used by code generated by Alex for src/Analyzer/Parser/Lexer.x\n    , array                 ^>= 0.5.4\n    , deepseq               ^>= 1.4.4\n  other-modules: Paths_waspc\n  exposed-modules:\n    FilePath.Extra\n    Wasp.Analyzer\n    Wasp.Analyzer.AnalyzeError\n    Wasp.Analyzer.ErrorMessage\n    Wasp.Analyzer.Evaluator\n    Wasp.Analyzer.Evaluator.Bindings\n    Wasp.Analyzer.Evaluator.Evaluation\n    Wasp.Analyzer.Evaluator.Evaluation.Combinators\n    Wasp.Analyzer.Evaluator.Evaluation.Internal\n    Wasp.Analyzer.Evaluator.Evaluation.TypedDictExpr\n    Wasp.Analyzer.Evaluator.Evaluation.TypedDictExpr.Combinators\n    Wasp.Analyzer.Evaluator.Evaluation.TypedExpr\n    Wasp.Analyzer.Evaluator.Evaluation.TypedExpr.Combinators\n    Wasp.Analyzer.Evaluator.EvaluationError\n    Wasp.Analyzer.Parser\n    Wasp.Analyzer.Parser.AST\n    Wasp.Analyzer.Parser.AST.PrettyPrinter\n    Wasp.Analyzer.Parser.Ctx\n    Wasp.Analyzer.Parser.ConcreteParser\n    Wasp.Analyzer.Parser.ConcreteParser.ParseError\n    Wasp.Analyzer.Parser.CST\n    Wasp.Analyzer.Parser.CST.Traverse\n    Wasp.Analyzer.Parser.ConcreteParser.ParserLib\n    Wasp.Analyzer.Parser.Lexer\n    Wasp.Analyzer.Parser.Lexer.Lexer\n    Wasp.Analyzer.Parser.Lexer.Internal\n    Wasp.Analyzer.Parser.ParseError\n    Wasp.Analyzer.Parser.PrettyPrinter\n    Wasp.Analyzer.Parser.AbstractParser\n    Wasp.Analyzer.Parser.AbstractParser.Monad\n    Wasp.Analyzer.Parser.SourceOffset\n    Wasp.Analyzer.Parser.SourcePosition\n    Wasp.Analyzer.Parser.SourceRegion\n    Wasp.Analyzer.Parser.SourceSpan\n    Wasp.Analyzer.Parser.Token\n    Wasp.Analyzer.Parser.TokenSet\n    Wasp.Analyzer.StdTypeDefinitions\n    Wasp.Analyzer.StdTypeDefinitions.App.Dependency\n    Wasp.Analyzer.StdTypeDefinitions.Entity\n    Wasp.Analyzer.Type\n    Wasp.Analyzer.TypeChecker\n    Wasp.Analyzer.TypeChecker.AST\n    Wasp.Analyzer.TypeChecker.Internal\n    Wasp.Analyzer.TypeChecker.Monad\n    Wasp.Analyzer.TypeChecker.TypeError\n    Wasp.Analyzer.TypeDefinitions\n    Wasp.Analyzer.TypeDefinitions.Class.HasCustomEvaluation\n    Wasp.Analyzer.TypeDefinitions.Class.IsDeclType\n    Wasp.Analyzer.TypeDefinitions.Class.IsEnumType\n    Wasp.Analyzer.TypeDefinitions.Internal\n    Wasp.Analyzer.TypeDefinitions.TH\n    Wasp.Analyzer.TypeDefinitions.TH.Common\n    Wasp.Analyzer.TypeDefinitions.TH.Decl\n    Wasp.Analyzer.TypeDefinitions.TH.Enum\n    Wasp.AppSpec\n    Wasp.AppSpec.Action\n    Wasp.AppSpec.App\n    Wasp.AppSpec.App.Auth\n    Wasp.AppSpec.App.Client\n    Wasp.AppSpec.App.Db\n    Wasp.AppSpec.App.Dependency\n    Wasp.AppSpec.App.Server\n    Wasp.AppSpec.Core.Decl\n    Wasp.AppSpec.Core.Ref\n    Wasp.AppSpec.Entity\n    Wasp.AppSpec.Entity.Field\n    Wasp.AppSpec.ExternalCode\n    Wasp.AppSpec.ExtImport\n    Wasp.AppSpec.Job\n    Wasp.AppSpec.JSON\n    Wasp.AppSpec.Operation\n    Wasp.AppSpec.Page\n    Wasp.AppSpec.Query\n    Wasp.AppSpec.Route\n    Wasp.AppSpec.Valid\n    Wasp.AppSpec.Util\n    Wasp.Common\n    Wasp.CompileOptions\n    Wasp.Data\n    Wasp.Error\n    Wasp.ExternalCode\n    Wasp.Generator\n    Wasp.Generator.Common\n    Wasp.Generator.DbGenerator\n    Wasp.Generator.DbGenerator.Common\n    Wasp.Generator.DbGenerator.Jobs\n    Wasp.Generator.DbGenerator.Operations\n    Wasp.Generator.DockerGenerator\n    Wasp.Generator.ExternalCodeGenerator\n    Wasp.Generator.ExternalCodeGenerator.Common\n    Wasp.Generator.ExternalCodeGenerator.Js\n    Wasp.Generator.FileDraft\n    Wasp.Generator.FileDraft.CopyDirFileDraft\n    Wasp.Generator.FileDraft.CopyFileDraft\n    Wasp.Generator.FileDraft.TemplateFileDraft\n    Wasp.Generator.FileDraft.TextFileDraft\n    Wasp.Generator.FileDraft.Writeable\n    Wasp.Generator.FileDraft.WriteableMonad\n    Wasp.Generator.Job\n    Wasp.Generator.Job.IO\n    Wasp.Generator.Job.Process\n    Wasp.Generator.JsImport\n    Wasp.Generator.Monad\n    Wasp.Generator.ServerGenerator\n    Wasp.Generator.ServerGenerator.AuthG\n    Wasp.Generator.ServerGenerator.Common\n    Wasp.Generator.ServerGenerator.ConfigG\n    Wasp.Generator.ServerGenerator.ExternalCodeGenerator\n    Wasp.Generator.ServerGenerator.JobGenerator\n    Wasp.Generator.ServerGenerator.OperationsG\n    Wasp.Generator.ServerGenerator.OperationsRoutesG\n    Wasp.Generator.ServerGenerator.Setup\n    Wasp.Generator.ServerGenerator.Start\n    Wasp.Generator.Setup\n    Wasp.Generator.Start\n    Wasp.Generator.Templates\n    Wasp.Generator.WebAppGenerator\n    Wasp.Generator.WebAppGenerator.AuthG\n    Wasp.Generator.WebAppGenerator.Common\n    Wasp.Generator.WebAppGenerator.ExternalCodeGenerator\n    Wasp.Generator.WebAppGenerator.OperationsGenerator\n    Wasp.Generator.WebAppGenerator.OperationsGenerator.ResourcesG\n    Wasp.Generator.WebAppGenerator.RouterGenerator\n    Wasp.Generator.WebAppGenerator.Setup\n    Wasp.Generator.WebAppGenerator.Start\n    Wasp.Generator.WriteFileDrafts\n    Wasp.Lib\n    Wasp.NpmDependency\n    Wasp.Psl.Ast.Model\n    Wasp.Psl.Generator.Model\n    Wasp.Psl.Parser.Model\n    Wasp.SemanticVersion\n    Wasp.Util\n    Wasp.Util.Control.Monad\n    Wasp.Util.Fib\n    Wasp.Util.IO\n    Wasp.Util.Terminal\n    Wasp.WaspignoreFile\n    Wasp.Generator.NpmDependencies\n    Wasp.Generator.NpmInstall\n    Wasp.Message\n\nlibrary waspls\n  import: common-all\n  hs-source-dirs: waspls/src\n  exposed-modules:\n    Wasp.LSP.Server\n  other-modules:\n    Wasp.LSP.ServerState\n    Wasp.LSP.ServerConfig\n    Wasp.LSP.ServerM\n    Wasp.LSP.Handlers\n    Wasp.LSP.Diagnostic\n    Wasp.LSP.Completion\n    Wasp.LSP.Util\n    Wasp.LSP.Syntax\n  build-depends:\n      base\n    , aeson\n    , aeson-pretty\n    , deepseq\n    , data-default ^>=0.7.1.1\n    , hslogger ^>=1.3.1.0\n    , lens ^>=5.1\n    , lsp ^>=1.4.0.0\n    , lsp-types ^>=1.4.0.1\n    , mtl\n    , text\n    , transformers ^>=0.5.6.2\n    , utf8-string\n    , waspc\n\nlibrary cli-lib\n  import: common-all\n  hs-source-dirs: cli/src\n  build-depends:\n      directory\n    , base\n    , filepath\n    , time\n    , aeson\n    , mtl\n    , async\n    , exceptions\n    , cryptonite\n    , fsnotify\n    , http-conduit\n    , optparse-applicative ^>=0.17.0.0\n    , path\n    , path-io\n    , strong-path\n    , utf8-string\n    , uuid\n    , waspc\n    , waspls\n  other-modules: Paths_waspc\n  exposed-modules:\n    Wasp.Cli.Command\n    Wasp.Cli.Command.BashCompletion\n    Wasp.Cli.Command.Build\n    Wasp.Cli.Command.Call\n    Wasp.Cli.Command.Clean\n    Wasp.Cli.Command.Common\n    Wasp.Cli.Command.Compile\n    Wasp.Cli.Command.CreateNewProject\n    Wasp.Cli.Command.Db\n    Wasp.Cli.Command.Db.Migrate\n    Wasp.Cli.Command.Deps\n    Wasp.Cli.Command.Info\n    Wasp.Cli.Command.Start\n    Wasp.Cli.Command.Telemetry\n    Wasp.Cli.Command.Telemetry.Common\n    Wasp.Cli.Command.Telemetry.Project\n    Wasp.Cli.Command.Telemetry.User\n    Wasp.Cli.Command.Watch\n    Wasp.Cli.Command.WaspLS\n    Wasp.Cli.Common\n    Wasp.Cli.Terminal\n    Wasp.Cli.Command.Message\n    Wasp.Cli.Message\n\nexecutable wasp-cli\n  import: common-all, common-exe\n  hs-source-dirs: cli/exe\n  main-is: Main.hs\n  build-depends:\n      base\n    , async\n    , waspc\n    , cli-lib\n    , with-utf8 ^>= 1.0.2\n  other-modules:\n      Paths_waspc\n\ntest-suite waspc-test\n  import: common-all, common-exe\n  type: exitcode-stdio-1.0\n  hs-source-dirs: test\n  main-is: TastyDiscoverDriver.hs\n  build-tool-depends:\n    tasty-discover:tasty-discover\n  build-depends:\n    , aeson\n    , base\n    , Diff                  ^>= 0.4.1\n    , deepseq\n    , filepath\n    , mtl\n    , parsec\n    , path\n    , split\n    , strong-path\n    , text\n    , unordered-containers\n    , bytestring\n    , waspc\n    , QuickCheck            ^>= 2.14\n    , tasty                 ^>= 1.4.2\n    -- tasty-hspec 1.1.7 introduces breaking changes, which is why we have < 1.1.7 .\n    , tasty-hspec           >= 1.1 && < 1.1.7\n    , tasty-quickcheck      ^>= 0.10\n    , tasty-golden          ^>= 2.3.5\n  other-modules:\n    Analyzer.Evaluation.EvaluationErrorTest\n    Analyzer.EvaluatorTest\n    Analyzer.Parser.ConcreteParserTest\n    Analyzer.Parser.CST.TraverseTest\n    Analyzer.Parser.ParseErrorTest\n    Analyzer.Parser.SourcePositionTest\n    Analyzer.ParserTest\n    Analyzer.TestUtil\n    Analyzer.TypeChecker.InternalTest\n    Analyzer.TypeCheckerTest\n    AnalyzerTest\n    AppSpec.ValidTest\n    ErrorTest\n    FilePath.ExtraTest\n    Fixtures\n    Generator.ExternalCodeGenerator.JsTest\n    Generator.FileDraft.CopyFileDraftTest\n    Generator.FileDraft.TemplateFileDraftTest\n    Generator.MockWriteableMonad\n    Generator.WebAppGeneratorTest\n    Generator.WriteFileDraftsTest\n    Psl.Common.ModelTest\n    Psl.Generator.ModelTest\n    Psl.Parser.ModelTest\n    Test.Util\n    Util.FibTest\n    Util.Control.MonadTest\n    UtilTest\n    Util.Diff\n    SemanticVersionTest\n    WaspignoreFileTest\n    Paths_waspc\n    Generator.NpmDependenciesTest\n\ntest-suite cli-test\n  import: common-all, common-exe\n  type: exitcode-stdio-1.0\n  hs-source-dirs: cli/test\n  main-is: TastyDiscoverDriver.hs\n  build-tool-depends:\n    tasty-discover:tasty-discover\n  build-depends:\n    , base\n    , waspc\n    , cli-lib\n    , QuickCheck            ^>= 2.14\n    , tasty                 ^>= 1.4.2\n    -- tasty-hspec 1.1.7 introduces breaking changes, which is why we have < 1.1.7 .\n    , tasty-hspec           >= 1.1 && < 1.1.7\n    , tasty-quickcheck      ^>= 0.10\n  other-modules:\n    TerminalTest\n    Paths_waspc\n\ntest-suite e2e-test\n  import: common-all, common-exe\n  type: exitcode-stdio-1.0\n  hs-source-dirs: e2e-test\n  main-is: Main.hs\n  build-tool-depends: waspc:wasp-cli\n  build-depends:\n    , aeson\n    , directory\n    , base\n    , filepath\n    , strong-path\n    , text\n    , mtl\n    , bytestring\n    , dir-traverse\n    , aeson-pretty\n    , process\n    , tasty                 ^>= 1.4.2\n    -- tasty-hspec 1.1.7 introduces breaking changes, which is why we have < 1.1.7 .\n    , tasty-hspec           >= 1.1 && < 1.1.7\n    , tasty-golden          ^>= 2.3.5\n  other-modules:\n    Common\n    GoldenTest\n    ShellCommands\n    Tests.WaspBuildTest\n    Tests.WaspCompileTest\n    Tests.WaspJobTest\n    Tests.WaspMigrateTest\n    Tests.WaspNewTest",  
      pstateOffset = 0,
      pstateSourcePos = SourcePos {sourceName = "", sourceLine = Pos 1, sourceColumn = Pos 1},
      pstateTabWidth = Pos 8,
      pstateLinePrefix = ""
    }
  }
    
Some unused dependencies for test cli-test in package waspc
  QuickCheck
  tasty-quickcheck
Some unused dependencies for test waspc-test in package waspc
  QuickCheck
Some unused base dependencies for package waspc
  array
@dfithian
Copy link
Owner

Hey, I just merged #23. Can you check if it fixes your issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants