Avoid unnecessary Docs.META initializations#48469
Merged
vtjnash merged 1 commit intoJuliaLang:masterfrom Feb 1, 2023
Merged
Conversation
vtjnash
reviewed
Jan 31, 2023
Member
vtjnash
left a comment
There was a problem hiding this comment.
It feels a bit awkward to duplicate this everywhere. Could we add a boolean argument to meta that defines whether to call initmeta or to return some sort of empty object instead?
8b8e963 to
37c9843
Compare
If the target module does not have a Docs.META dict (e.g. if `--strip-metadata` is used), `Docs.meta()` has the side effect of creating a new IdDict and initializing the Docs.META field of the target module. We need to avoid eval'ing into modules after they've been closed, so for methods that do not mutate the new IdDict we should avoid the init. Resolves JuliaLang#48390. Co-authored-by: Steve Kelly <kd2cca@gmail.com>
37c9843 to
2efe28d
Compare
35 tasks
KristofferC
pushed a commit
that referenced
this pull request
Feb 5, 2023
If the target module does not have a Docs.META dict (e.g. if `--strip-metadata` is used), `Docs.meta()` has the side effect of creating a new IdDict and initializing the Docs.META field of the target module. We need to avoid eval'ing into modules after they've been closed, so for methods that do not mutate the new IdDict we should avoid the init. Resolves #48390. Co-authored-by: Steve Kelly <kd2cca@gmail.com> (cherry picked from commit 798b589)
KristofferC
pushed a commit
that referenced
this pull request
Feb 8, 2023
If the target module does not have a Docs.META dict (e.g. if `--strip-metadata` is used), `Docs.meta()` has the side effect of creating a new IdDict and initializing the Docs.META field of the target module. We need to avoid eval'ing into modules after they've been closed, so for methods that do not mutate the new IdDict we should avoid the init. Resolves #48390. Co-authored-by: Steve Kelly <kd2cca@gmail.com> (cherry picked from commit 798b589)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the target module does not have a Docs.META dict (e.g. if
--strip-metadatais used),Docs.meta()has the side effect of creating a new IdDict and initializing the Docs.META field of the target module. We need to avoid eval'ing into modules after they've been closed, so the init should be skipped in methods that do not mutate the new IdDict.Resolves #48390.
Co-authored-by: @sjkelly