So I've almost got this working, I am getting a strange error message from elements right now:
Value cannot be null.
Parameter name: path1
I notice this happens when I give a reference to bazel's internal
rt.jar as a
--ref. If I give it an absolute path to my OS JDK this actually works fine, but it breaks the sandbox. I am using this sandboxed command being generated by bazel:
(cd /private/var/tmp/_bazel_perezd/811f60be6a1051cf49585ebc378f1218/execroot/blockparty && \
exec env - \
external/mono/mono/bin/mono external/elements/ElementsCC.exe -d '--out=bazel-out/local-fastbuild/bin/devtools/bazel/rules/elements/examples' '--assembly=vote.blockparty.testing' '--ref=external/local_jdk/jre/lib/rt.jar' '-t=library' '-m=cooper' devtools/bazel/rules/elements/examples/Test.swift devtools/bazel/rules/elements/examples/Other.swift)
Here's the full debug log from mono if it helps:
Also, I can confirm that the rt.jar file is present at the path I am referencing.