8000 Use `Unit_info.t` more like upstream by lukemaurer · Pull Request #3926 · oxcaml/oxcaml · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use Unit_info.t more like upstream #3926

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

Merged

Conversation

lukemaurer
Copy link
Contributor
@lukemaurer lukemaurer commented Apr 24, 2025

Cleans up some of the awkwardness around Compilation_unit.t and Unit_info.t, the later of which was recently introduced upstream. This PR is meant to take on a slice of what #3828 is doing (and as such it's admittedly a little scattered).

Specifically:

Meant to be reviewed commit by commit.

This requires knowing the pack prefix wherever a `Unit_info.t` is created, but
generally we're creating a `Compilation_unit.t` and a `Unit_info.t` at the same
time so the caller already knows the pack prefix.
This makes downstream and upstream much better aligned, since upstream uses
`Unit_info.t` in this way. (Some of the changes here are just copied from
upstream, in fact.) There's a bit of awkwardness in that we often need to use
dummy unit info because (unlike upstream) our typechecker can't run without a
current `Compilation_unit.t` set.
@riaqn
Copy link
Contributor
riaqn commented May 29, 2025

Someone else should check alignment with upstream.

@goldfirere
Copy link
Collaborator

@voodoos You’re probably best poised to check about upstream alignment — do you think this achieves that goal?

@mshinwell
Copy link
Collaborator

I don't understand why there is a constraint with upstream alignment.

@goldfirere
Copy link
Collaborator

No constraint. But my understanding is that the goal of this PR is to increase upstream alignment, and so we may want to check that we've done so. If we can't do that today, then I think we can skip that step.

Copy link
Contributor
@voodoos voodoos left a comment

Choose a reason for hiding this comment

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

I think this does improve alignment with upstream and more importantly it reconciles the parallel evolution of Compilation_unit.t and Unit_info.t.

@mshinwell mshinwell merged commit 0a87b44 into oxcaml:main May 30, 2025
28 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.

5 participants
0