You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And I'm trying to understand how to correctly migrate to the yaml format for spago@next. The test field lets me specify extra library deps but not sources? Is this instead hardwired to "src" and "test/spec"?
I now ran the migrate command on spago classic to get a yaml for my main spago.dhall. Then I added a test block to the package:
test:
main: Test.Maindependencies:
- spec
- spec-discovery
- effect
- aff
- control
- either
and I needed to state this is a module or it would complain on no main() exported:
And both spago test and spago bundle now works. The only thing I'm wondering about is the fact that I haven't clearly separated spec sources from main sources like before - the bundle previously didn't even have access to the spec sources but now they might do?
Or is this a non-issue with minification?
The text was updated successfully, but these errors were encountered:
esbuild will discard unused code in your project, so any code not reachable from your Main module will be discarded (including your test code and test dependencies).
The only thing I'm wondering about is the fact that I haven't clearly separated spec sources from main sources like before
By convention Spago will only include the src folder when compiling (and bundling) the package, and include the test folder only when running spago test
This might change with #967 though, keep an eye on that one too.
I'd consider this ticket resolved for now, but feel free to reopen if there are any other questions
Hi,
I have this .spec.dhall:
And I'm trying to understand how to correctly migrate to the yaml format for spago@next. The test field lets me specify extra library deps but not sources? Is this instead hardwired to "src" and "test/spec"?
I now ran the migrate command on spago classic to get a yaml for my main spago.dhall. Then I added a test block to the package:
and I needed to state this is a module or it would complain on no main() exported:
So my full yaml now is:
And both spago test and spago bundle now works. The only thing I'm wondering about is the fact that I haven't clearly separated spec sources from main sources like before - the bundle previously didn't even have access to the spec sources but now they might do?
Or is this a non-issue with minification?
The text was updated successfully, but these errors were encountered: