Skip to content
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

Unshadow run_and_read #361

Merged
merged 4 commits into from
Feb 16, 2025
Merged

Unshadow run_and_read #361

merged 4 commits into from
Feb 16, 2025

Conversation

gasche
Copy link
Member

@gasche gasche commented Feb 16, 2025

This is a proposal to fix the compatibility breakage due to the shadowing of My_unix.run_and_read by Command.run_and_read: the new function is now called Command.run_spec_and_read.

(I tried to understand why we care about having this function at all, and discovered another place in the codebase where it could/should be used -- we run ocamlc -where at runtime to locate the stdlib. I went ahead and used it there as well.)

The addition of `Command.run_and_read` can break code as it shadows
`My_unix.run_and_read` and has a different type. This is fixed here
by renaming the function to `run_spec_and_read`.

See
  ocaml#353 (comment)
for an example of breakage in the wild.
@gasche gasche force-pushed the unshadow_run_and_read branch from c348ab1 to e9efc7d Compare February 16, 2025 08:21
@gasche gasche mentioned this pull request Feb 16, 2025
@gasche
Copy link
Member Author

gasche commented Feb 16, 2025

I decided to accept my own proposal :-) I think this is good enough and will let me release a fixed 0.16 version quickly.

@gasche gasche merged commit 2052a05 into ocaml:master Feb 16, 2025
22 checks passed
@gasche
Copy link
Member Author

gasche commented Feb 16, 2025

(The build of tgls appears to add 23s on ubuntu CI machines, this is okay.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant