Skip to content

Conversation

@shonfeder
Copy link
Member

@shonfeder shonfeder commented Aug 24, 2025

Closes #12253

The refactor here is quite straightforward, with the exception of maintaining backwards compat with current syntax of library stanzas. To achieve this, we infer kind virtual whenever virtual_modules are specified alongside a compatible kind (normal or virtual).

Two incidental improvements are also suggested here: small fixes to the docs and cleaning up a case analysis handling ppx_* kinds.

TODO

To wrap this up, I need

  • input on how to signal the right error for incompatible library specifications
  • add a test case to check the error handling of invalid cases

Reviewing

Initial review by commit is probably helpful, since the commits are broken into a few tiny, distinct phases.

@shonfeder shonfeder force-pushed the 12253/virtual-lib-refactor branch 3 times, most recently from 0364151 to 7072da7 Compare August 24, 2025 15:10
@shonfeder shonfeder requested a review from rgrinberg August 24, 2025 17:09
@shonfeder shonfeder force-pushed the 12253/virtual-lib-refactor branch 2 times, most recently from cadae32 to f320a5f Compare August 25, 2025 04:35
@shonfeder shonfeder force-pushed the 12253/virtual-lib-refactor branch 2 times, most recently from a1ead07 to 0e163cb Compare August 25, 2025 16:29
@shonfeder shonfeder marked this pull request as ready for review August 25, 2025 16:45
@shonfeder shonfeder force-pushed the 12253/virtual-lib-refactor branch from f6d359c to 7f27f4e Compare August 25, 2025 16:48
@shonfeder
Copy link
Member Author

This should be ready for a final review pass. Thank you for the input @Alizter and @rgrinberg! It was very helpful :)

@shonfeder shonfeder force-pushed the 12253/virtual-lib-refactor branch from 167e29b to 92058cf Compare August 25, 2025 20:37
@shonfeder
Copy link
Member Author

This is ready for review again :)

Signed-off-by: Shon Feder <[email protected]>
@shonfeder
Copy link
Member Author

Thanks for the review and patient guidance!

Signed-off-by: Shon Feder <[email protected]>
@shonfeder shonfeder force-pushed the 12253/virtual-lib-refactor branch from 441f143 to 4aea40e Compare August 25, 2025 22:17
Signed-off-by: Shon Feder <[email protected]>
@shonfeder shonfeder merged commit a88ec65 into ocaml:main Aug 25, 2025
24 checks passed
@shonfeder shonfeder deleted the 12253/virtual-lib-refactor branch August 25, 2025 23:02
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.

Refactor representation of library virtuality to represent disjoint logic in the type system

3 participants