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

Name Clash with http-kit Template #318

Closed
thron7 opened this issue Oct 12, 2017 · 3 comments
Closed

Name Clash with http-kit Template #318

thron7 opened this issue Oct 12, 2017 · 3 comments

Comments

@thron7
Copy link

thron7 commented Oct 12, 2017

The Luminus Leiningen template has a +http-kit feature. On the code level, this is implemented in the name space leiningen.new.http-kit. But this clashes with http-kit's own Leiningen template.

I believe this only happens when you add http-kit's template to your ~/.lein/profiles.clj, as they require in their How to install instructions.

When you then try to use the Luminus template this is what you get:

$ lein new luminus test                                                                                                                     
Could not load template, failed with: java.lang.IllegalAccessError: http-kit-features does not exist, compiling:(leiningen/new/luminus.clj:1:1)

I'm still new to Leiningen so I'm not sure if there can be anything done about it. At least maybe a word in the documentation could help.

@yogthos
Copy link
Member

yogthos commented Oct 12, 2017

Thanks for the report, I renamed the namespace in the latest template to avoid the collision. Let me know if that fixes the issue on your end.

@thron7
Copy link
Author

thron7 commented Oct 12, 2017

Yep, works (not surprisingly).

While that was an easy fix, it seems there is an intrinsic problem here: As templates populate the same leiningen.new name space the danger of name collisions increases with every new template. But maybe this is not a real issue as long as you don't add the template dependency to your ~/.lein/profiles.clj (which probably few templates require).

Thanks for the quick fix.

@yogthos
Copy link
Member

yogthos commented Oct 13, 2017

👍

@yogthos yogthos closed this as completed Oct 13, 2017
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