spago icon indicating copy to clipboard operation
spago copied to clipboard

`packages.dhall` doesn't respect local package's sources

Open ptwales opened this issue 5 years ago • 4 comments

From the Mono repo example, say if I define a local dependency like so

let overrides =
     { liba = ./liba/spago.dhall as Location
     }

in packages.dhall. But liba/spago.dhall defines it's sources with something like

, sources = 
    [ "liba/src/main/purescript/**/*.purs" ]

Say there is server code in liba/src/main/java/.

I can compile code in liba with

spago -x liba/spago.dhall build

but I when I compile app1 which depends on liba then I also compile source code in liba/src/test/purescript/. This is because spago is using liba/src/**/*.purs as the sources. You can confirm this behaviour with

spago -x app1/spago.dhall sources

which will always output ./liba/src/**/*.purs regardless of what liba/spago.dhall says it's sources are.

ptwales avatar Jun 29 '20 19:06 ptwales

Issue is in Packages.hs#L87

ptwales avatar Jun 29 '20 22:06 ptwales

I think JordanMartinez meant #663

ptwales avatar Jul 13 '20 14:07 ptwales

Ah, yeah, sorry about that.

JordanMartinez avatar Jul 13 '20 14:07 JordanMartinez

@ptwales sorry, it's a bit of a hectic time and I did not manage to look at this yet, I'll get to it shortly

f-f avatar Jul 13 '20 14:07 f-f

The new Spago does not have sources anymore, closing

f-f avatar Sep 20 '23 16:09 f-f