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

Installing Helix into my project #5

Closed
amazing-Mantse opened this issue Jan 13, 2020 · 16 comments
Closed

Installing Helix into my project #5

amazing-Mantse opened this issue Jan 13, 2020 · 16 comments

Comments

@amazing-Mantse
Copy link

amazing-Mantse commented Jan 13, 2020

I am installing helix into an app that is already using hx

I have included the library as so:
lilactown/helix {:mvn/version "0.0.6"}

Requiring [helix.core :refer [defnc]] throws the error bellow:

[Figwheel:WARNING] Could not Analyze: /_SLASH_impl_SLASH_class/js.cljs is not a relative path resources/public/js/helix/core.cljs [Figwheel:SEVERE] java.lang.IllegalArgumentException: /_SLASH_impl_SLASH_class/js.cljs is not a relative path

This basically applies to requiring anything.

@lilactown
Copy link
Owner

I haven't tested helix in a figwheel project. Can you tell me what version of figwheel you're using? A minimal repro would be very appreciated.

@amazing-Mantse
Copy link
Author

amazing-Mantse commented Jan 14, 2020

I am using figwheel version "0.2.3" and I run it with the following options
--main figwheel.main --compile-opts {:source-map,true} . --build common --repl

@amazing-Mantse
Copy link
Author

@Lokeh what do you mean a minimal repro? Do you mean in a new clojure project?

@amazing-Mantse
Copy link
Author

@Lokeh here is a minimal hello_world project with figwheel and helix. Still getting the same error.

https://github.com/amazing-Mantse/figwheel-helix

image

@lilactown
Copy link
Owner

Thanks, the minimal example did help.

I created a new branch here: https://github.com/Lokeh/helix/tree/fix-figwheel

There were some additional problems in your minimal repro about "react" that I'm not sure right now how to fix.

Also, unfortunately my current fix in that branch is running into this bug in shadow-cljs thheller/shadow-cljs#638 which prevents me from releasing it at this time.

@amazing-Mantse
Copy link
Author

Thank you very much.I will checkout the branch.

@amazing-Mantse
Copy link
Author

Hi, I have updated the minimal app (https://github.com/amazing-Mantse/figwheel-helix) and fixed the react issues. From helix.core I get the error bellow:

image

@lilactown
Copy link
Owner

@amazing-Mantse I've merged the fix-figwheel branch with master, which removes that require.

@amazing-Mantse
Copy link
Author

Okay, but now I am back to the original error:

I added the dependancy as so :
Lokeh/helix {:git/url "https://github.com/Lokeh/helix" :sha "cfb99f8936aa8d7f71f9759a81a93df9cb4a1772"}} and now I have this error:

image

@lilactown
Copy link
Owner

I've updated the fix-figwheel branch with a few more adjustments.

Here's an example repo using it: https://github.com/Lokeh/fighweel-helix

It's based off of your repo @amazing-Mantse, there was some misconfiguration that I fixed along with updating to the latest git SHA.

@lilactown lilactown mentioned this issue Feb 24, 2020
@danieroux
Copy link
Contributor

danieroux commented Mar 4, 2020

Thank you, Figwheel works with this.

The next challenge is advanced compilation which fails with:

ERROR: JSC_LANGUAGE_FEATURE. This language feature is only supported for ECMASCRIPT6 mode or better

I've pushed an example of that to https://github.com/amazing-Mantse/figwheel-helix

And it can be replicated with:

clojure --main cljs.main --compile-opts dev.cljs.edn --compile-opts '{:optimizations :advanced}' --compile

@lilactown
Copy link
Owner

helix's implementation uses several ES6 features - specifically, the class keyword. You'll want to configure your release step to set :language-in :es6 at the least.

@amazing-Mantse
Copy link
Author

@Lokeh Thank you very mush for making helix work with Figwheel. We have successfully managed to incorporate it, into our project. And it's looking great. We still have a few hx components, but we are transitioning.

@lilactown
Copy link
Owner

hooray!

@deoqc
Copy link

deoqc commented Mar 13, 2020

Hello!! Thx for the great library @Lokeh

Tried w/:

Lokeh/helix {:git/url "https://github.com/Lokeh/helix"
                       :sha "56ff32df5ca270aac7b63d6ad55adb9c2318f61d"}

but it is throwing Error building classpath. Destination path "helix" already exists and is not an empty directory.

Any ideias/help?

@lilactown
Copy link
Owner

@deoqc this looks like a problem with your local deps. Perhaps try clearing your deps cache? If you keep running into this, please open another issue.

For figwheel usage, I will continue to rebase #26 onto master for the time being until I can merge them. Figwheel users should check that PR to get the latest version compatible.

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

4 participants