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

refactor(runtime): stream processing #22

Merged
merged 3 commits into from
Jul 12, 2024
Merged

Conversation

loichyan
Copy link
Owner

@loichyan loichyan commented Jul 12, 2024

Implements the stream processing discussed in #18, which should greatly reduce memory usage during checking. Note that it currently does not limit the maximum line size (code), and may cause a lot of allocation when reading super large lines (though I believe this should be an extremely rare case).

It also adds a file size limit (16MB by default) which can be manually specified by --size-limit=1GB ...

@loichyan loichyan mentioned this pull request Jul 12, 2024
@loichyan loichyan merged commit 4b888e8 into main Jul 12, 2024
3 checks passed
@loichyan loichyan deleted the refactor/stream-processing branch July 12, 2024 14:24
@loichyan loichyan mentioned this pull request Jul 14, 2024
loichyan added a commit that referenced this pull request Jul 14, 2024
### ✨ Overview

This release mainly addresses the high memory usage issue reported in #18: fixed a potential memory leak (#21) and implemented stream processing (#22).

Also, some UI changes were introduced in #21, as we switched the diagnostic reporter from [codespan_reporting](https://docs.rs/codespan-reporting/latest/codespan_reporting) to [miette](https://docs.rs/miette/latest/miette).

### 🚀 Features

- **(runtime)** Set exact file size limit
- **(runtime)** Add file limitation
- **(runtime)** Filter out binary files

### 🐛 Bug Fixes

- **(cli)** Report the source path of diagnostics (#23)
- **(cli)** Subtract with overflow

### 🚜 Refactor

- **(runtime)** Implement stream processing
- **(runtime)** Zero-copy diagnostics reporting
- Replace `codespan-reporting` with `miette`
- **(util)** Rename `tryb!` to `try!`

### 📚 Documentation

- **(readme)** Update badge URLs

### 🎨 Styling

- Format with prettier
- Make nightly rustfmt compatible with the stable rustfmt
- Format with nightly rustfmt

### ⚙️ Miscellaneous Tasks

- Generate UTC release date
- Report Cargo check results
- Rewrite
- Fix typos
- Fix typos
- Update author name
- Add checks (#17)

### 🛠️ Build

- **(nix)** Update flakes
- **(cargo)** Update dependencies
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.

1 participant