Skip to content

Conversation

@JeffBezanson
Copy link
Member

Not totally sure this will work in 100% of cases, but I like to keep this working as much as possible.

@JeffBezanson JeffBezanson added the backport 1.12 Change should be backported to release-1.12 label Jun 6, 2025

Serializer(io::IO) = Serializer{typeof(io)}(io)

const current_module = ScopedValue{Union{Nothing,Module}}(nothing)
Copy link
Member

Choose a reason for hiding this comment

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

Why isn't this just a struct field of the Serializer?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah it can be, I just wanted to avoid mutation.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, now I know why: there are other subtypes that won't have the field, so rather than need to add it to all of them I think the ScopedValue is better.

@KristofferC KristofferC mentioned this pull request Jun 6, 2025
60 tasks
@KristofferC KristofferC mentioned this pull request Jul 22, 2025
20 tasks
@JeffBezanson JeffBezanson merged commit 9f69961 into master Jul 29, 2025
5 of 7 checks passed
@JeffBezanson JeffBezanson deleted the jb/sercompat111 branch July 29, 2025 21:39
KristofferC pushed a commit that referenced this pull request Aug 6, 2025
@KristofferC KristofferC mentioned this pull request Aug 6, 2025
38 tasks
@KristofferC KristofferC removed the backport 1.12 Change should be backported to release-1.12 label Aug 19, 2025
KristofferC pushed a commit that referenced this pull request Sep 5, 2025
KristofferC pushed a commit that referenced this pull request Sep 15, 2025
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.

3 participants