Skip to content

Fix a gadt typing bug introduced in the merge#32

Merged
mshinwell merged 1 commit intomshinwell:5.2-runtime-wip-mainfrom
ccasin:gadt-bug
Aug 19, 2024
Merged

Fix a gadt typing bug introduced in the merge#32
mshinwell merged 1 commit intomshinwell:5.2-runtime-wip-mainfrom
ccasin:gadt-bug

Conversation

@ccasin
Copy link
Copy Markdown

@ccasin ccasin commented Aug 17, 2024

This is a sad bug. ctype has always used a ref to old the environment, but now that's obscured a bit behind the "unification environment" such that we missed we were holding on to a stale value after the environment had been updated in add_gadt_equation.

I haven't added a test because I'm not sure of the current state of the test suite. Hopefully there is already a test for this that we accidentally promoted. If not we can add one.

@mshinwell mshinwell merged commit 52e8eeb into mshinwell:5.2-runtime-wip-main Aug 19, 2024
@mshinwell
Copy link
Copy Markdown
Owner

@ccasin Github has noticed that I merged this manually, but please still review.

Copy link
Copy Markdown

@ncik-roberts ncik-roberts left a comment

Choose a reason for hiding this comment

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

This looks right to me. (I can't literally click "Approve", maybe because this is in a fork.) I might have suggested not using env at all in this function, replacing all use sites with get_env uenv to avoid the possibility of such bugs, but this has downsides itself (repetitive, drifts from upstream).

@ccasin
Copy link
Copy Markdown
Author

ccasin commented Aug 20, 2024

This looks right to me. (I can't literally click "Approve", maybe because this is in a fork.) I might have suggested not using env at all in this function, replacing all use sites with get_env uenv to avoid the possibility of such bugs, but this has downsides itself (repetitive, drifts from upstream).

Yes, I was on the fence about doing that but decided not to for merge conflict reasons.

mshinwell added a commit to oxcaml/oxcaml that referenced this pull request Aug 28, 2024
…2975)

Fix layout equation bug

(cherry picked from commit 61559e5)

Co-authored-by: Chris Casinghino <ccasinghino@janestreet.com>
lukemaurer pushed a commit to lukemaurer/flambda-backend that referenced this pull request Oct 23, 2024
… in the merge) (oxcaml#2975)

Fix layout equation bug

(cherry picked from commit 61559e5)

Co-authored-by: Chris Casinghino <ccasinghino@janestreet.com>
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