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

Implement most of Crystal::System.print_error in native Crystal #14116

Merged

Conversation

HertzDevil
Copy link
Contributor

This PR handles the formatting aspects of Crystal::System.print_error to the extent needed by all existing calls to it (see #12396 (comment)), so that it depends on LibC.write or ._write directly, instead of .dprintf or .snprintf.

On Windows, the last remaining use of LibC.snprintf would be sprintf "%g" after this PR.

Copy link
Member

@straight-shoota straight-shoota left a comment

Choose a reason for hiding this comment

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

Looks good, I just have a couple of comments regarding code quality.

src/crystal/system/print_error.cr Outdated Show resolved Hide resolved
src/crystal/system/print_error.cr Outdated Show resolved Hide resolved
src/crystal/system/print_error.cr Outdated Show resolved Hide resolved
@straight-shoota straight-shoota added this to the 1.11.0 milestone Dec 20, 2023
@straight-shoota straight-shoota merged commit ddee6c6 into crystal-lang:master Dec 22, 2023
55 checks passed
@HertzDevil HertzDevil deleted the feature/print-error-native branch December 22, 2023 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants