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

fw-main Allow empty folder instead of ::schema/has-cljs-source-files #698

Open
lgrapenthin opened this issue Jun 19, 2018 · 6 comments
Open

Comments

@lgrapenthin
Copy link

When setting up new projects I set up folders like for cljc that are empty when I start figwheel. Would be nice if they were made possible.

@bhauman
Copy link
Owner

bhauman commented Jun 20, 2018

The ClojureScript compiler fails with a pretty mysterious error when it is provided a directory to compile that has no source files in it, I added this protection so that you know why. If you don't want to get this error then don't provide watch directories that have no source files in them.

If you are getting this error in a situation where you are not providing an empty directory as a watch directory please let me know.

@bhauman
Copy link
Owner

bhauman commented Jun 20, 2018

This would really need to be fixed in the compiler.

@lgrapenthin
Copy link
Author

lgrapenthin commented Jun 23, 2018

Actually I had to dig through the source code to understand that I got the error because of an empty folder.

The error message was not helpful in this case and would certainly misdirect a non-expert user. It said nothing about an empty folder or clj* files being required in a folder.

If this is a CLJS compiler bug/GIGO situation I'd prefer figwheel not to interfere or warn at most. Iac it would be helpful if the error message got improved.

@bhauman
Copy link
Owner

bhauman commented Jun 23, 2018

Actually, I don't know what error you received.

Did you get a spec error?

@bhauman
Copy link
Owner

bhauman commented Jun 23, 2018

The CLJS compiler error is just an NPE when trying to read the source.

@lgrapenthin
Copy link
Author

It showed me the watch-dirs vector and highlighted the empty folder, mentioned the ::watch-dirs spec but didn't mention its emptiness being the problem.

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

No branches or pull requests

2 participants