Giter Site home page Giter Site logo

Comments (19)

garyb avatar garyb commented on June 25, 2024

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.

from pulp.

raould avatar raould commented on June 25, 2024

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.

from pulp.

hdgarrood avatar hdgarrood commented on June 25, 2024

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

from pulp.

raould avatar raould commented on June 25, 2024

(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.)

from pulp.

garyb avatar garyb commented on June 25, 2024

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.

from pulp.

hdgarrood avatar hdgarrood commented on June 25, 2024

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.

from pulp.

paf31 avatar paf31 commented on June 25, 2024

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

from pulp.

garyb avatar garyb commented on June 25, 2024

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

from pulp.

paf31 avatar paf31 commented on June 25, 2024

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

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

from pulp.

garyb avatar garyb commented on June 25, 2024

And I didn't realise it suggested that 😄

from pulp.

garyb avatar garyb commented on June 25, 2024

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.

from pulp.

hdgarrood avatar hdgarrood commented on June 25, 2024

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).

from pulp.

hdgarrood avatar hdgarrood commented on June 25, 2024

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

from pulp.

hdgarrood avatar hdgarrood commented on June 25, 2024

@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.

from pulp.

raould avatar raould commented on June 25, 2024

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

from pulp.

raould avatar raould commented on June 25, 2024

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

from pulp.

hdgarrood avatar hdgarrood commented on June 25, 2024

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.

from pulp.

hdgarrood avatar hdgarrood commented on June 25, 2024

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

from pulp.

hdgarrood avatar hdgarrood commented on June 25, 2024

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

from pulp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.