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

feat: revamp file IO, this time Windows compatible #4950

Merged
merged 10 commits into from
Aug 7, 2024
Merged

feat: revamp file IO, this time Windows compatible #4950

merged 10 commits into from
Aug 7, 2024

Conversation

hargoniX
Copy link
Contributor

@hargoniX hargoniX commented Aug 7, 2024

This implements a naive version of getline because Windows does not have getline. Given the fact that FILE has buffered IO, calling fgetc in a loop is not as big of a performance hazard as it might seem at first glance.

The proper solution to this would of course be to have our own buffered IO so we are fully in charge of the buffer. In this situation we could check the entire buffer for a newline at once instead of char by char. However that is not going to happen for the near future so I propose we stay with this implementation. If reading individual lines of a file does truly end up being the performance bottle neck we have already won^^.

@hargoniX hargoniX added the release-ci Enable all CI checks for a PR, like is done for releases label Aug 7, 2024
@hargoniX hargoniX requested a review from Kha August 7, 2024 18:08
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc August 7, 2024 18:18 Inactive
@github-actions github-actions bot added the changes-stage0 Contains stage0 changes, merge manually using rebase label Aug 7, 2024
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc August 7, 2024 18:35 Inactive
@hargoniX
Copy link
Contributor Author

hargoniX commented Aug 7, 2024

The failing check is a race condition introduced by a different bug on master. The key point of this PR: Make bootstrapping and in general Lean compile and run on all architectures again. is achieved so this is fine to merge.

@hargoniX hargoniX enabled auto-merge August 7, 2024 19:26
@hargoniX hargoniX disabled auto-merge August 7, 2024 19:30
@Kha Kha merged commit 7776852 into master Aug 7, 2024
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes-stage0 Contains stage0 changes, merge manually using rebase release-ci Enable all CI checks for a PR, like is done for releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants