Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "sources" config key #173

Closed
f-f opened this issue Apr 9, 2019 · 4 comments

Comments

Projects
None yet
4 participants
@f-f
Copy link
Member

commented Apr 9, 2019

Spago includes some default path globs in the build:

  • src/**/*.purs
  • test/**/*.purs

However, if you don't have those directories, it will complain:

purs compile: No files found using pattern: src/**/*.purs
purs compile: No files found using pattern: test/**/*.purs

I propose we instead make this explicit (and configurable) by adding a sources (or paths) key to the configuration, and removing the implicit paths.
We should migrate existing configurations so the change is backwards compatible.

@f-f f-f added discussion UX labels Apr 9, 2019

@jmackie

This comment has been minimized.

Copy link

commented Apr 12, 2019

+1

@f-f

This comment has been minimized.

Copy link
Member Author

commented Apr 12, 2019

Related to this: I just discovered that purs build --watch doesn't work if you are missing one of the defaults folders.

I'll add a "bug" label because I think the fix for this issue should also address it.

@f-f f-f added the defect label Apr 12, 2019

@f-f f-f added this to the 0.8 milestone Apr 18, 2019

@f-f f-f modified the milestones: 0.8, 0.9 May 13, 2019

@bbarker

This comment has been minimized.

Copy link
Contributor

commented May 20, 2019

Perhaps this can also be disabled somehow, since in the case where one's tests has additional dependencies, it should be structured as a separate project described in https://github.com/spacchetti/spago/#separate-devdependencies-or-test-dependencies ?

@f-f

This comment has been minimized.

Copy link
Member Author

commented May 20, 2019

@bbarker Once we enable this you'd explicitly have the globs in your spago.dhall, e.g. for a test-only project:

{ name = "my-tests"
, packages = ../packages.dhall
, dependencies = [ "console", "effect", "prelude" ]
, sources = [ "test/**/*.purs" ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.