Avi-D-coder / implicit-hie

Auto generate a stack or cabal multi component hie.yaml file
BSD 3-Clause "New" or "Revised" License
201 stars 17 forks source link

Issues with cabal.project pointing to current directory #32

Open georgefst opened 3 years ago

georgefst commented 3 years ago

My cabal.project has:

packages:
    ./.
    ../reanimate-svg

implict-hie produces:

cradle:
  cabal:
    - path: "../reanimate-svg/src"
      component: "lib:reanimate-svg"

    - path: "../reanimate-svg/test"
      component: "reanimate-svg:test:w3c-spec"

When I'd expect:

cradle:
  cabal:
    - path: "./app/Main.hs"
      component: "svgone:exe:svgone"

    - path: "./src"
      component: "lib:svgone"

    - path: "../reanimate-svg/src"
      component: "lib:reanimate-svg"

    - path: "../reanimate-svg/test"
      component: "reanimate-svg:test:w3c-spec"

Which is actually what I get if I change ./. to .. But the latter isn't actually valid syntax - cabal gives:

cabal: Error parsing project file
/Users/gthomas/personal/svgone/cabal.project:1:
Parse of field 'packages' failed.