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

bpart: Start enforcing min_world for global variable definitions #57150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Keno
Copy link
Member

@Keno Keno commented Jan 24, 2025

This is the analog of #57102 for global variables. Unlike for consants, there is no automatic global backdate mechanism. The reasoning for this is that global variables can be declared at any time, unlike constants which can only be decalared once their value is available. As a result code patterns using Core.eval to declare globals are rarer and likely incorrect.

@Keno Keno force-pushed the kf/globalminworld branch from a06285c to b53c87e Compare January 24, 2025 03:41
Base automatically changed from kf/backdatedconstwarn to master January 25, 2025 02:50
Keno added a commit to JuliaLang/Distributed.jl that referenced this pull request Jan 25, 2025
The internal function `jl_set_const` is allowed during bootstrap only
and ignores world age partition. This would give incorrect results after
JuliaLang/julia#57150. Just eval the constant definition directly,
which has well defined semantics.
This is the analog of #57102 for global variables. Unlike for consants,
there is no automatic global backdate mechanism. The reasoning for this
is that global variables can be declared at any time, unlike constants
which can only be decalared once their value is available. As a result
code patterns using `Core.eval` to declare globals are rarer and likely
incorrect.
@Keno Keno force-pushed the kf/globalminworld branch from b53c87e to dfa20f4 Compare January 25, 2025 04:57
@Keno
Copy link
Member Author

Keno commented Jan 25, 2025

Distributed test failure is JuliaLang/Distributed.jl#125.

JamesWrigley pushed a commit to JuliaLang/Distributed.jl that referenced this pull request Jan 26, 2025
The internal function `jl_set_const` is allowed during bootstrap only
and ignores world age partition. This would give incorrect results after
JuliaLang/julia#57150. Just eval the constant definition directly,
which has well defined semantics.
JamesWrigley pushed a commit to JuliaLang/Distributed.jl that referenced this pull request Jan 26, 2025
The internal function `jl_set_const` is allowed during bootstrap only
and ignores world age partition. This would give incorrect results after
JuliaLang/julia#57150. Just eval the constant definition directly,
which has well defined semantics.
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.

1 participant