diff --git a/pkl/BUILD.bazel b/pkl/BUILD.bazel index efdf8d2..ec20925 100644 --- a/pkl/BUILD.bazel +++ b/pkl/BUILD.bazel @@ -99,6 +99,9 @@ toolchain( java_binary( name = "pkl_cli_java", + jvm_flags = [ + "-XX:MaxRAMPercentage=80.0", + ], main_class = "org.pkl.cli.Main", runtime_deps = [ artifact( diff --git a/pkl/private/org/pkl_lang/bazel/symlinks/Symlinks.java b/pkl/private/org/pkl_lang/bazel/symlinks/Symlinks.java index 2a94b43..ef9adb5 100644 --- a/pkl/private/org/pkl_lang/bazel/symlinks/Symlinks.java +++ b/pkl/private/org/pkl_lang/bazel/symlinks/Symlinks.java @@ -60,7 +60,7 @@ public static void main(String[] args) throws IOException { } Files.createDirectories(link.getParent()); - Files.createSymbolicLink(link, target); + Files.copy(target, link); } } } diff --git a/pkl/private/pkl.bzl b/pkl/private/pkl.bzl index 9749199..2e6b24c 100644 --- a/pkl/private/pkl.bzl +++ b/pkl/private/pkl.bzl @@ -62,6 +62,10 @@ def _prepare_pkl_script(ctx, is_test_target): path_to_symlink_target[file.path] = path cache_root_path, caches, cache_deps = root_caches_and_dependencies(ctx.attr.srcs + ctx.attr.deps) + + if is_test_target and cache_root_path != None: + cache_root_path = cache_root_path.removeprefix(ctx.genfiles_dir.path)[1:] + if len(caches): path_to_symlink_target[caches[0].pkl_project.path] = "%s/PklProject" % working_dir path_to_symlink_target[caches[0].pkl_project_deps.path] = "%s/PklProject.deps.json" % working_dir