I'm trying to make a very simple implementation with Starlark:
greeting.bzl
def greet():
print ("Hello World!")
test.bzl
load (":greeting.bzl", "greet")
greet()
And execute it with:
java -jar Starlark_deploy.jar test.bzl
The result of the above call is:
file ':greeting.bzl' was not correctly loaded. Make sure the 'load' statement appears in the global scope in your file
My end goal is to have my own Starlark engine, which depends on Starlark_deploy.jar
. I'll then leverage the existence of Bazel rules (such as htt_archive
and http_file
) and define my own Starlark superset.
I'm using Bazel java implementation for Starlark described in the official documentation. It was obtained by:
- Cloning Bazel repository
- Running
bazel build //src/main/java/com/google/devtools/starlark:Starlark_deploy.jar
- The output of the command above is
Starlark_deploy.jar