Skip to content

Adapt to current_terminfo becoming a OncePerProcess #121

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

Merged
merged 1 commit into from
Jul 20, 2025
Merged

Conversation

Keno
Copy link
Member

@Keno Keno commented Jul 1, 2025

Adjusts to #58854. Generated with Claude Code.

Julia base is changing current_terminfo from a simple global variable to
a OncePerProcess type. This commit updates all usage sites to call
current_terminfo() as a function instead of accessing it directly.

This is the counterpart to
<JuliaLang/julia#58854>.

For tests, we need to directly manipulate the OncePerProcess' internal
value field, which relies on undocumented internals but is necessary for
testing different terminal configurations without restarting the
process.
@tecosaur
Copy link
Member

tecosaur commented Jul 3, 2025

This looks good to me, I've just tweaked the comment in with_terminfo for my personal taste, and taken a lock on Base.current_terminfo.lock around the modification: I think it's superfluous but seems like a "might as well" thing to me 🤷

I've also edited the commit message to reference #58854 directly.

For the record, Claude seems to have done a solid job getting all the references and writing appropriate explanations for the changes.

@tecosaur tecosaur merged commit 1aafc2f into main Jul 20, 2025
0 of 4 checks passed
@tecosaur tecosaur deleted the kf/terminfoopp branch July 20, 2025 08:57
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.

2 participants