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

Fix unclosed open file when counting occurrences #1315

Closed
wants to merge 1 commit into from

Conversation

panglesd
Copy link
Collaborator

As reported by @lukemaurer!

Unfortunately In_channel.with_open_bin in only available in 4.14, we are not there yet...

Copy link
Collaborator

@Julow Julow left a comment

Choose a reason for hiding this comment

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

There are other occurrences (hehe) of this in Indexing.read_occurrences, Occurrences.count and at the end of Occurrences.aggregate. I think we need helper functions for reading and writing marshals safely.

Marshal.from_channel ic
let res = Marshal.from_channel ic in
close_in ic;
res
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have Fun.protect in Odoc_utils that can help.

@Julow Julow mentioned this pull request Feb 25, 2025
@panglesd
Copy link
Collaborator Author

Supersed by #1320

@panglesd panglesd closed this Feb 26, 2025
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.

2 participants