Replies: 1 comment 1 reply
-
We had this feature in Ammonite https://ammonite.io/#1.0.2 I didn't port it to Mill because I never really used it, but could be added if we really wanted One concern is that it breaks the hermeticity of your build. But if you're importing stuff from random URLs, you probably know what you're getting yourself into, and hopefully know what you're doing |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The
$file
import currently accepts a source file, compiles it with the current Mill project classpath and adds it to the classpath.It would be nice, if we could have a variant that accepts remote files. It should work the same, just that the file is downloaded locally before it is further processed.
Futhermore, it should also support
.scala
files, not just.sc
files. There reason is, that.sc
files need to be surrounded with a synthetic object. Once inside such sythetic object, it' no longer possible to contribute external commands to the build.Once we have that support, we can also support it via the
--import
cli option.And here is my motivation:
I'd like to provide rather simple plugins as external modules, and a simple Scala source file would be the easiest solution for that. For example: lefou/millw#40
Imagine a simple remote plugin provided as a source file.
Beta Was this translation helpful? Give feedback.
All reactions