Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to get rules_pkl to pass for larger projects #31

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion pkl/private/org/pkl_lang/bazel/symlinks/Symlinks.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static void main(String[] args) throws IOException {
}

Files.createDirectories(link.getParent());
Files.createSymbolicLink(link, target);
Files.copy(target, link);
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions pkl/private/pkl.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down