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

Add %classpath support for maven classifiers #7209

Closed
jpallas opened this issue Apr 19, 2018 · 2 comments
Closed

Add %classpath support for maven classifiers #7209

jpallas opened this issue Apr 19, 2018 · 2 comments
Assignees

Comments

@jpallas
Copy link
Contributor

jpallas commented Apr 19, 2018

Maven classifiers are sometimes used to distinguish platform-specific versions of an artifact (examples: ND4J, TensorFlow for Scala). The current %classpath add mvn magic doesn't have any way to specify a classifier.

Adding an additional optional classifier field seems pretty straightforward.

For this use case (platform-specific variation), maybe a dynamic capability like the one in %classpath add dynamic ought to be available to the mvn magic. That would allow computing the desired Maven coordinates, making notebooks using this a little more portable. But it's not obvious how to do that without the syntax getting ugly.

@scottdraves
Copy link
Contributor

scottdraves commented Apr 21, 2018

Hey Joe thanks for alerting me to this. I see your point about needing dynamic access too.
Let me think about it. When we did dynamic it was kind of a hurry and I knew there should be a general mechanism. My first thought it something like what shells does, $(code).
It might as well work for all magics?

@jpallas
Copy link
Contributor Author

jpallas commented Apr 21, 2018

Yeah, the possibility of having a generalized substitution mechanism crossed my mind, too. Doing $(code) substitution on all magics doesn't sound crazy. It might be weird if that code had any side effects, but that would probably be covered by a general "don't be surprised if doing strange things gives you strange results" disclaimer. If the code threw an exception, you'd want to report it sensibly. But if that all happens before the final version with substitutions is processed, the existing magic commands might not need any changes.

jaroslawmalekcodete added a commit that referenced this issue Apr 25, 2018
scottdraves pushed a commit that referenced this issue Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants