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

write(::IO, ::AnnotatedChar) does not return an Int #54195

Closed
LilithHafner opened this issue Apr 22, 2024 · 6 comments
Closed

write(::IO, ::AnnotatedChar) does not return an Int #54195

LilithHafner opened this issue Apr 22, 2024 · 6 comments
Labels
kind:bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@LilithHafner
Copy link
Member

write is supposed to return the number of bytes written.

julia> write(IOContext(Base.AnnotatedIOBuffer()), Base.AnnotatedChar('a', [:y => 2]))

julia> write(IOContext(Base.AnnotatedIOBuffer()), Base.AnnotatedChar('a', [:y => 2])) === nothing
true

#53715 will fix this particular case, but not fix the underlying issue with the write(::IO, ::AnnotatedChar) method.

@LilithHafner LilithHafner added the kind:bug Indicates an unexpected problem or unintended behavior label Apr 22, 2024
@LilithHafner LilithHafner added this to the 1.11 milestone Apr 22, 2024
@LilithHafner
Copy link
Member Author

This is fixed on master, just needs a backport.

@KristofferC
Copy link
Sponsor Member

Which one?

@LilithHafner
Copy link
Member Author

Probably a StyledStrings bump; idk. cc @tecosaur

@tecosaur
Copy link
Contributor

Yep, this was fixed in JuliaLang/StyledStrings.jl@c084718, and will be fixed in 1.11 once #54127 is merged.

@KristofferC
Copy link
Sponsor Member

(For posterity, I would suggest that you just merge those PRs yourself because if it doesn't have a backport label it is easy it get missed).

@tecosaur
Copy link
Contributor

I'll keep that in mind for in any such future PRs (there will probably be one more based on a chat Lilith and I had a few days ago), I just didn't want to step on any toes with the release process 😅.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants