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

Avoid using stderr explicitly #3089

Merged
merged 3 commits into from
Jan 24, 2025
Merged

Conversation

Lukasa
Copy link
Contributor

@Lukasa Lukasa commented Jan 24, 2025

Motivation

It's tempting for us to use the FILE * for stderr whenever we want to print to it. However, the Linux libc modules aren't appropriately annotated to call that field constant, and indeed it isn't. This causes Swift to throw a fit if we even touch it.

Modifications

Introduce an awkward function that issues direct writes to stderr instead of using the FILE *.

Result

Swift is happier.

Motivation

It's tempting for us to use the FILE * for stderr whenever we
want to print to it. However, the Linux libc modules aren't
appropriately annotated to call that field constant, and indeed it
isn't. This causes Swift to throw a fit if we even touch it.

Modifications

Introduce an awkward function that issues direct writes to
stderr instead of using the FILE *.

Result

Swift is happier.
@Lukasa Lukasa added the 🔨 semver/patch No public API change. label Jan 24, 2025
@Lukasa Lukasa enabled auto-merge (squash) January 24, 2025 16:09
@Lukasa Lukasa merged commit 85742bc into apple:main Jan 24, 2025
33 of 35 checks passed
@Lukasa Lukasa deleted the cb-avoid-using-stderr branch January 24, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants