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

Warning on build: No files found using pattern: src/**/*.js #84

Closed
kristianmandrup opened this issue Oct 4, 2015 · 19 comments
Closed

Comments

@kristianmandrup
Copy link

Just created my first pulp project and ran pulp build

~/repos/purescript-projs/tryit 
10:58 $ pulp build
* Building project in /Users/kristianmandrup/repos/purescript-projs/tryit
psc: No files found using pattern: src/**/*.js
* Build successful.

Same issue running test:

$ pulp test
* Building project in /Users/kristianmandrup/repos/purescript-projs/tryit
psc: No files found using pattern: src/**/*.js
psc: No files found using pattern: test/**/*.js
* Build successful. Running tests...
You should add some tests.
* Tests OK.

It works just fine, just curious about the message: No files found using pattern: src/**/*.js
Feels like a warning to me?

PS: How do I use the psc-ide? It contains a server as well? https://github.com/kRITZCREEK/psc-ide
I need stack, cabal, ... Don't know the Haskell environment.

For now I'm using the Atom plugin.

Thanks :)

@garyb
Copy link
Member

garyb commented Oct 4, 2015

Yep, it's a warning - when we first introduced the FFI that uses external files there were two separate arguments for supplying the locations of PureScript and JS files - we then added a warning for when a path is specified that matches no files (which is what you're seeing here) - but the most recent change was to make it so one path glob can be used to specify both JS and PS files.

I've not opened a PR yet, as not everyone using Pulp will necessarily be on the latest compiler version, so I was intending on waiting until we cut a 0.8 release before doing so.

@raould
Copy link

raould commented Mar 10, 2016

I have no idea what the comments here mean in terms of this being resolved or not. What I would like to suggest is that sooner rather than later the confusing-alarming-apparently-noise-not-signal-at-least-to-newbies message

psc: No files found using pattern: src/**/*.js

go away. $0.02 intending to help the entire PureScript experience be more streamlined so more people want to use it instead of getting quickly scared away.

@hdgarrood
Copy link
Collaborator

Yes, we understand this, and it's going to happen. Please don't rush us.

@raould
Copy link

raould commented Mar 10, 2016

(Is it anything I can do in a PR, or is there too much nuance for me to make any useful example commits? I mean I expect there's a way you want it done, and 99 million other ways not to do it.)

@garyb
Copy link
Member

garyb commented Mar 10, 2016

This is the issue that holds it up a bit purescript/purescript#1937.

@hdgarrood would a src/**/*.* style glob help for now perhaps? Although I guess that still breaks down if a directory has a dot in the name.

@hdgarrood
Copy link
Collaborator

Yeah that seems like it should work. Directories won't have dots in their names in most cases, at least not if people are following the (almost universal) convention of file names relating to module names. I personally don't mind imposing that requirement for pulp too much.

@paf31
Copy link
Contributor

paf31 commented Mar 10, 2016

A workaround could be to just ignore directories in the compiler.

@garyb
Copy link
Member

garyb commented Mar 10, 2016

I think that's the fix, not a workaround 😄... for "workaround" I was thinking of changes we could make in pulp alone.

@paf31
Copy link
Contributor

paf31 commented Mar 10, 2016

Ah, but the linked issue suggests recursively enumerating files inside directories.

Edit: sorry, I misread it. Didn't realize it suggested either/both.

@garyb
Copy link
Member

garyb commented Mar 10, 2016

And I didn't realise it suggested that 😄

@garyb
Copy link
Member

garyb commented Mar 10, 2016

I'm not sure the directory approach works though, does it, as if you gave did psc src bower_components you'd end up picking up test .purs files and all sorts from the libraries, so you'd still need a glob to get that one to behave as desired.

@hdgarrood
Copy link
Collaborator

This does open an opportunity for pain given that pulp is not the only build tool, though. Suppose someone who doesn't use pulp puts purescript code in a directory that does have dots; it would break only after a pulp user tried to compile it.

We could change pulp's glob now, and fix the issue in the compiler later (the above situation seems so rare that I don't mind there being some short window of time where it might happen).

@hdgarrood
Copy link
Collaborator

Haha sorry I didn't see all these responses. Yes, I suppose we do want to stick with globbing then.

@hdgarrood
Copy link
Collaborator

@raould if you were to send a PR making pulp use globs that end with **/*.* instead of **/*.js or **/*.purs that would make me very happy. :) Of course it would be contingent on @bodil's approval too.

@raould
Copy link

raould commented Mar 10, 2016

ok! i will try (tho honestly probably not before a several hours have passed, and i get out of work.)

@raould
Copy link

raould commented Mar 11, 2016

Apologies. Tried and failed. I am too clueless at the moment apparently to get Pulp to build. I will post the error I am getting here, but I don't mean to make this drag on with my ignorance -- somebody who Knows What They Are Doing can address this issue later. :-) I am on commit 27743da of the pulp repo. I got purescript built on my linux x86 machine via 'stack'. I did 'bower update'.

$ pulp run
* Building project in /home/superman/Dev/pulp
Error found:
at /home/superman/Dev/pulp/src/Pulp/Project.purs line 14, column 28 - line 14, column 28

  Unable to parse module:
  unexpected "class"
  expecting "module", identifier, (, proper name or )


See https://github.com/purescript/purescript/wiki/Error-Code-ErrorParsingModule for more information,
or to contribute content related to this error.

* ERROR: Subcommand terminated with error code 1

@hdgarrood
Copy link
Collaborator

Unfortunately stack install purescript will usually get you an out of date version, so you'll want to run stack install purescript --resolver=nightly. I think the download page on the website has only just been fixed in this respect.

@hdgarrood
Copy link
Collaborator

That is: the problem here is that your psc is too old. Pulp requires at least 0.8.0 now.

@hdgarrood
Copy link
Collaborator

This is resolved by psc no longer requiring to be told where to find FFI files as of 0.9.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants