Skip to content

Commit f952145

Browse files
Use spago install workaround to test.dhall file
1 parent c23e96e commit f952145

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

test.dhall

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
{ name = "node-event-emitters-test"
2-
, dependencies =
3-
[ "aff"
4-
, "effect"
5-
, "either"
6-
, "foldable-traversable"
7-
, "functions"
8-
, "nullable"
9-
, "prelude"
10-
, "refs"
11-
, "spec"
12-
, "tuples"
13-
, "unsafe-coerce"
14-
]
15-
, packages = ./packages.dhall
16-
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
17-
}
1+
let config = ./spago.dhall
2+
3+
-- This hack only works because I know how [email protected] works.
4+
-- When we run `spago -x test.dhall install`, the package(s) installed
5+
-- will be added to the `spagoHack` dependencies array, but Spago
6+
-- will say the config file was not updated. It's lying.
7+
-- Then when we run `spago -x test.dhall build`,
8+
-- the final expression in the `in` block will be used.
9+
let spagoHack =
10+
{ name = "node-event-emitters-test"
11+
, dependencies =
12+
[ "aff", "foldable-traversable", "maybe", "refs", "spec", "tuples" ]
13+
, packages = ./packages.dhall
14+
, sources = [ "test/**/*.purs" ]
15+
}
16+
17+
in { name = spagoHack.name
18+
, dependencies = spagoHack.dependencies # config.dependencies
19+
, packages = ./packages.dhall
20+
, sources = spagoHack.sources # config.sources
21+
}

0 commit comments

Comments
 (0)