Skip to content

Bundle AND/OR Vendor compliment with Unravel #64

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

Open
SevereOverfl0w opened this issue Dec 22, 2017 · 15 comments
Open

Bundle AND/OR Vendor compliment with Unravel #64

SevereOverfl0w opened this issue Dec 22, 2017 · 15 comments

Comments

@SevereOverfl0w
Copy link
Member

As unrepl supports out-of-band classpath loading, it would be awesome if unravel responded to requests for compliment.core.

It would be even better if unravel used it's own vendored version of compliment (at unravel_${unravel_version}.compliment.XXX) for preventing conflicts with either other clients (multiple unravel versions might hit the same server) and the project (I might offer RPC form of compliment, because, reasons…)

https://github.com/benedekfazekas/mranderson is particularly relevant to this.

@arichiardi
Copy link
Contributor

About this, I was successfully able to pack compliment using https://github.com/boot-clj/boot-sources, and I have a task that does that + topo order.

I am not sure this is still relevant because of the new sideloading thingie but I would "only" need to add the versioning to the namespace for preventing conflicts and it should be ready to go.

@pesterhazy
Copy link
Collaborator

This works for me in master now:

unravel --method clojure --flag compliment --classpath ~/.m2/repository/compliment/compliment/0.3.5/compliment-0.3.5.jar

Next step: bundling

@arichiardi
Copy link
Contributor

@pesterhazy are you planning to use mranderson? I am still thinking boot has an edge for this kind of things, more flexibility and stuff. Let me know if you want me to modify this gist. In there I am creating the whole blob, probably at this point I would need to just copy the sources and change the namespaces, maybe copying some part of mranderson.

@arichiardi
Copy link
Contributor

Actually this needs to happen at runtime right?

@pesterhazy
Copy link
Collaborator

I think it can happen at build time. Unravel (or other unrepl clients) ship with their "shaded" or "vendored" version of compliment. If you connect to the same repl using the same unravel version, you'll end up reusing the same NS, but that should be fine.

@arichiardi
Copy link
Contributor

I was more thinking about this use case: "Please side load this library for me", but maybe I am overengineering this.

@pesterhazy
Copy link
Collaborator

If you're sideloading your own library, you don't need to shade it, no? Or what would be the use case?

@pesterhazy
Copy link
Collaborator

Thanks for the gist. I'm not sure how it would be used. Could you add instructions on how to shade/vendorize compliment?

@arichiardi
Copy link
Contributor

arichiardi commented Jan 2, 2018

There is an example at the bottom but again...that builds the entire blob so I need to change it.

Boot-sources downloads the :deps and saves them in the :to-dir.

@volrath
Copy link
Member

volrath commented Jan 2, 2018

If you're sideloading your own library, you don't need to shade it, no? Or what would be the use case?

Even with sideloading, we still need shading. Without it, you might end up with classpath conflicts if you don't shade. i.e. You sideload unravel's version of compliment "X.X.X" and the user wants to use compliment "Y.Y.Y"

@arichiardi for the record, I would like to do shading with boot instead of leiningen in SPIRAL, even though I don't have a really good reason for it except that I like boot better 😄

@pesterhazy
Copy link
Collaborator

@volrath yeah I agree that sideloading and shading are complimentary (pun intended!)

My point was just when you're sideloading your own code, i.e. not something that ships with unravel/spiral, shading may not be as important.

@volrath
Copy link
Member

volrath commented Jan 2, 2018

@pesterhazy ah! got it, right!

@arichiardi
Copy link
Contributor

I'll modify the gist and contribute it here ok? Let me take a crack at this.

@pesterhazy
Copy link
Collaborator

@arichiardi great!

@cgrand
Copy link
Member

cgrand commented Jan 2, 2018

I would even say that implicit shading of user code is a bad idea.

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

5 participants