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

figwheel idles when running tests from command line. (Built with webpack) #301

Open
LeifAndersen opened this issue Jul 14, 2021 · 3 comments

Comments

@LeifAndersen
Copy link
Contributor

I made a minimal example demonstrating it here:

https://github.com/LeifAndersen/figwheel-idle-example

To reproduce (from within the folder) run:

npm ci
clojure -M:text

The code will compile, and webpack will finish. But once the browser launches figwheel just sits without ever running anything.

If :optimization :whitespace is removed, (and thus the dependency to stream-http) is no longer needed, then it seems to work just fine.

Given how easy it is for clojurescript code to break only when optimizations are enabled, it would be good to be able to run tests with them turned on.

@bhauman
Copy link
Owner

bhauman commented Aug 2, 2021

Unfortunately figwheel communication via the REPL connection currently only work with optimizations :none. REPL communication is what's needed to send messages back and forth between the CLI process and the browser process which is running the tests. This has been baked in because you can't really do reloading with in any other optimization mode.

Technically it should be possible to do this but it would require a bit of a rethink just to hand this case.

@LeifAndersen
Copy link
Contributor Author

Sad, but makes sense. Would it be worth adding a note that :optimizations must be either not provided or set to :none on this page?: https://figwheel.org/docs/testing.html

@bhauman
Copy link
Owner

bhauman commented May 5, 2022

Added the note.

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