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

Empty `other-modules` leads to wrong output #30

Closed michaelpj closed 3 years ago

michaelpj commented 3 years ago

We have a stanza like this:

executable prism-unlock-exchange
    hs-source-dirs: prism/unlock-exchange
    other-modules:
    build-depends:
        base >=4.9 && <5

which gives output like this:

    - path: "plutus-scb/prism/unlock-exchange"
      component: "plutus-scb:exe:prism-unlock-exchange"
    - path: "plutus-scb/prism/unlock-exchange/build-depends:.hs"
      component: "plutus-scb:exe:prism-unlock-exchange"
    - path: "plutus-scb/prism/unlock-exchange/base.hs"
      component: "plutus-scb:exe:prism-unlock-exchange"

i.e. it's taking the cabal syntax after other-modules as, well, modules.

Not sure if this is related to https://github.com/Avi-D-coder/implicit-hie/issues/17.

michaelpj commented 3 years ago

Maybe also: https://github.com/Avi-D-coder/implicit-hie/issues/29#issuecomment-731967670

jneira commented 3 years ago

I wonder if it is time to revive #13 and use directly cabal parsers.

Avi-D-coder commented 3 years ago

@michaelpj When you get a chance could you make sure your issue is fixed, before I bump ghcide and hls dependence constraint.