Skip to content

Add all PKL libraies to pkl-config-java-internal#153

Merged
KushalP merged 5 commits intoapple:mainfrom
tjoneslo:fix-missing-dep-for-pkl-java-library
Feb 24, 2026
Merged

Add all PKL libraies to pkl-config-java-internal#153
KushalP merged 5 commits intoapple:mainfrom
tjoneslo:fix-missing-dep-for-pkl-java-library

Conversation

@tjoneslo
Copy link
Copy Markdown
Contributor

With the update of rules_java to 8.12.x or later, the java compiler now complains about missing transitive dependencies more assertively.

This affect the pkl_java_library rule when compiling *.pkl source code which uses the PKL core library functions. Trying to manually add these causes other problems. So add all of the PKL java libraies as dependecies to the pkl_java_library deps list.

Update a test as well to demonstrate and show the resolution to the problem.

revert two unneeded changes.

With the update of `rules_java` to `8.12.x` or later, the java compiler now complains about missing transitive dependencies more assertively.

This affect the `pkl_java_library` rule when compiling `*.pkl` source code which uses the PKL core library functions. Trying to manually add these causes other problems. So add all of the PKL java libraies as dependecies to the `pkl_java_library` deps list.

Update a test as well to demonstrate and show the resolution to the problem.

revert two unneeded changes.
@tjoneslo
Copy link
Copy Markdown
Contributor Author

addresses #152

Copy link
Copy Markdown

@gaurav-narula gaurav-narula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@KushalP
Copy link
Copy Markdown
Contributor

KushalP commented Feb 20, 2026

Should we now declare pkl-core and pkl-parser as explicit artifacts in the rules_pkl_deps maven.install in MODULE.bazel rather than relying on transitive resolution?

Animals.Dog dog2 = (Animals.Dog) animals.get(2);
assertEquals("Max", dog2.getName());
assertEquals("German Shepherd", dog2.getBreed());
assertEquals("Dog {\n name = Max\n age = 30.d\n breed = German Shepherd\n}", dog2.toString());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: a future-friendly test here is probably to directly test the getAge() accessor, as the lines above do. As we're validating the Duration gets correctly exported.

@KushalP KushalP merged commit 5860e9d into apple:main Feb 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants