Skip to content

Add VmType intermediate representation for types - #1838

Open
HT154 wants to merge 7 commits into
apple:mainfrom
HT154:vmtype
Open

HT154 wants to merge 7 commits into
apple:mainfrom
HT154:vmtype

Conversation

@HT154

@HT154 HT154 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

This has some downstream impacts:

  • CommandSpecParser now deals with VmType instead of TypeNode
  • VmReference now deals with VmType instead of PType
  • FunctionN types are now exported as PType.Function instead of PType.Class, which may affect consumers of module schema information. This changes pkldoc rendering of such types, which we do not consider a breaking change. pkl:reflect behavior is unchanged.

@HT154
HT154 force-pushed the vmtype branch 9 times, most recently from 86f0ba1 to e3829a8 Compare September 1, 2026 22:01
@HT154
HT154 marked this pull request as ready for review September 1, 2026 22:01
@HT154
HT154 force-pushed the vmtype branch 4 times, most recently from 23fc10d to 768cef6 Compare September 3, 2026 00:21
@HT154 HT154 mentioned this pull request Sep 9, 2026

@bioball bioball left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This mostly looks good! Left some commentts

Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmReference.java Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/CommandSpecParser.java
Comment thread pkl-core/src/main/java/org/pkl/core/ast/member/ClassProperty.java Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java
@HT154
HT154 force-pushed the vmtype branch 2 times, most recently from 74501d6 to c69c62f Compare September 11, 2026 22:55
@HT154
HT154 requested a review from bioball September 11, 2026 22:55

@bioball bioball left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Getting really close!

Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/test/kotlin/org/pkl/core/runtime/VmTypeTest.kt Outdated
Comment thread pkl-core/src/test/kotlin/org/pkl/core/runtime/VmTypeTest.kt Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/test/kotlin/org/pkl/core/runtime/VmTypeTest.kt Outdated
Comment thread pkl-core/src/test/kotlin/org/pkl/core/runtime/VmTypeTest.kt Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java

@bioball bioball left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just some minor comments, but approving to unblock!

Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/main/java/org/pkl/core/runtime/VmType.java Outdated
Comment thread pkl-core/src/test/kotlin/org/pkl/core/runtime/VmTypeTest.kt
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