-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Dynamically add gen-path to classloader #31
Conversation
@Olical The way this works is that it steals the approach used by
And the bit of code that ensures that the correct class loader at play is from here mfikes/clojurescript@d68c939#diff-2c521d7ba435fbef7d128f4295f86785R611 The PR removes the gotcha warning, as well as the extra instructions regarding manually adding to I successfully tested this locally, but I think I must have an older clone of |
OK. Rebaselined against master. Going to re-test to ensure all is OK. |
OK @Olical, I've re-tested locally after having resolved merge conflicts and all appears to be OK. This PR is ready for review. |
This is great, thank you very much! I've got a bus ride to my parents right now so I'll give it a whirl and merge if it looks good. Thank you so much for lending your expertise to fix this. |
loader)))] | ||
(if (instance? DynamicClassLoader loader) | ||
(.addURL ^DynamicClassLoader loader u) | ||
(throw (IllegalAccessError. "Context classloader is not a DynamicClassLoader"))))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty cool stuff, will definitely be making use of this in other projects. Adding deps at runtime will be super handy with a Clojure plugin system I'll need soon. Thanks for a good example!
It worked! 🎉 I altered the readme to put the advanced compilation section above the gotchas on it's own now but that's all. It's no longer a gotcha, just a tip. Thanks for removing the part about the weird bug though. I guess it didn't fix simple or whitespace... will try though. |
Oh, it looks like you fixed the whitespace and simple errors too... I don't fully understand why this fixes it but I'm very happy about it! |
Hmm, okay, |
Fixes #30