Skip to content

Instantly share code, notes, and snippets.

@przemek-pokrywka
Created October 22, 2021 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save przemek-pokrywka/48c15f4150499f9e545f86c5549a5951 to your computer and use it in GitHub Desktop.
Save przemek-pokrywka/48c15f4150499f9e545f86c5549a5951 to your computer and use it in GitHub Desktop.
The Ammonite magic imports are (unfortunately!) NOT a valid Scala 😞 - the issue is that the dots within the version numbers are breaking compilation, even if you use the backticks
package $ivy
object `group::artifact:1` {
object `2` {
object `3` {
val exception = new Exception()
}
}
import $ivy.`group::artifact:1`.`2`.`3`.exception._
printStackTrace()
}
@przemek-pokrywka
Copy link
Author

Note that the above example "works" (have you noticed the amount of backticks? 😢 ), but:

import $ivy.`group::artifact:1.2.3`.exception._

does not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment