Open antonkulaga opened 6 years ago
Thanks you @antonkulaga. I run into this same issue and moving the problematic dependency to a separate file solved the issue. It would be nice to see this open issue solved.
i am curious what is this @
? a script divider? any document about it's usage? thanks.
@antonkulaga Shouldn't (my mistake, that's just for artifacts depending on runtime values)import $ivy..
instead be interp.load.ivy(..)
? See multistage scripts section.
@dynofu It is mentioned in multistage scripts section.
Since interp.load.ivy(..)
isn't a normal Scala method call (Ammonite needs to download JARs and put them on classpath..) a separator is needed to clarify that intention.
When I create script for ammonite 2.11 that has one or two @ then it is not imported properly. For example:
When I run ammonite and then import my spark script:
I do not see any local variables inside spark. As a workaround I had to put dependencies into separate script and import $file.deps inside spark.sc. However, having two scripts where one is only for dependencies is not convenient.