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

linter: use simdutf8 for validating files #5191

Closed
Boshen opened this issue Aug 25, 2024 · 2 comments · Fixed by #5196
Closed

linter: use simdutf8 for validating files #5191

Boshen opened this issue Aug 25, 2024 · 2 comments · Fixed by #5196
Labels
C-enhancement Category - New feature or request C-performance Category - Solution not expected to change functional behavior, only performance good first issue Experience Level - Good for newcomers

Comments

@Boshen
Copy link
Member

Boshen commented Aug 25, 2024

See rolldown/rolldown#2040

Our code to change is:

let file_result = fs::read_to_string(path).map_err(|e| {
Error::new(OxcDiagnostic::error(format!(
"Failed to open file {path:?} with error \"{e}\""
)))
});

@Boshen Boshen added C-enhancement Category - New feature or request good first issue Experience Level - Good for newcomers C-performance Category - Solution not expected to change functional behavior, only performance labels Aug 25, 2024
@shulaoda
Copy link
Contributor

Is it just changing this one place? I see that many places have used read_to_string.

@Boshen
Copy link
Member Author

Boshen commented Aug 25, 2024

Is it just changing this one place? I see that many places have used read_to_string.

Feel free to change it if it's in a hotspot for the linter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category - New feature or request C-performance Category - Solution not expected to change functional behavior, only performance good first issue Experience Level - Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants