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

improve type stability of Base.active_module() #45838

Merged
merged 1 commit into from
Jun 30, 2022
Merged

Conversation

aviatesk
Copy link
Sponsor Member

Now this method is called from many show-related utilities, so it
would be better to make it robust against invalidations.

@aviatesk aviatesk requested a review from rfourquet June 28, 2022 10:24
@aviatesk aviatesk closed this Jun 28, 2022
@aviatesk aviatesk reopened this Jun 28, 2022
@KristofferC
Copy link
Sponsor Member

I thought the type assert would contain that instability to the function.

Now this method is called from many `show`-related utilities, so it
would be better to make it robust against invalidations.
@aviatesk
Copy link
Sponsor Member Author

I thought the type assert would contain that instability to the function.

The type declaration for function return contains an implicit convert, that is potentially vulnerable to invalidation. So are the previous calls of getproperty (e.g. Base.active_repl.mistate.active_module).

@aviatesk aviatesk merged commit cce506f into master Jun 30, 2022
@aviatesk aviatesk deleted the avi/repl-active_module branch June 30, 2022 07:05
pcjentsch pushed a commit to pcjentsch/julia that referenced this pull request Aug 18, 2022
Now this method is called from many `show`-related utilities, so it
would be better to make it robust against invalidations.
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