You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Otherwise, the source code for this script is then wrapped in a package/object wrapper, corresponding to the path to the script from the current script's enclosing folder. For example, a script at path foo/bar/baz/Qux.sc will be wrapped in:
package foo.bar.baz
object Qux{
// script code
}
Despite this, I am unable to access the package-private symbols from the same package:
// org/apache/spark/sql/Foo.sc
import org.apache.spark.sql.Dataset
def foo(): Unit = {
println(Dataset)
println("foo")
}
def bar(): Unit = {
println(Dataset)
}
almond jupyter kernel's cell:
import $file.org.apache.spark.sql.Foo
Foo.foo()
execution error:
Compiling /home/jovyan/shared/users/faucct/org/apache/spark/sql/Foo.sc
/home/jovyan/shared/users/faucct/org/apache/spark/sql/Foo.sc:4: object Dataset in package sql cannot be accessed in package org.apache.spark.sql
println(Dataset)
^
/home/jovyan/shared/users/faucct/org/apache/spark/sql/Foo.sc:9: not found: value Dataset
println(Dataset)
^
Compilation Failed
Though, I am not sure if the problem is on your side or Almond's.
Putting the file three directories higher also does not help.
The text was updated successfully, but these errors were encountered:
The execution model says that the script files are wrapped in a package object – https://ammonite.io/#ExecutionModel
Despite this, I am unable to access the package-private symbols from the same package:
almond jupyter kernel's cell:
execution error:
Though, I am not sure if the problem is on your side or Almond's.
Putting the file three directories higher also does not help.
The text was updated successfully, but these errors were encountered: