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

fix: modulecontext no longer accidentally mutable #1409

Merged
merged 1 commit into from
May 6, 2024

Conversation

matt2e
Copy link
Collaborator

@matt2e matt2e commented May 6, 2024

Previously, ModuleContext had fields of maps which could be still be mutated.
Now we make a Builder which is a type alias of ModuleContext, which has all the mutating functions, and a Built() func that deep copies the builder and returns it as a ModuleContext.

@matt2e matt2e requested a review from a team as a code owner May 6, 2024 00:19
@matt2e matt2e requested review from worstell and removed request for a team May 6, 2024 00:19
@alecthomas alecthomas mentioned this pull request May 6, 2024
@matt2e matt2e force-pushed the matt2e/immutable-module-context-2 branch from bf7fb27 to 8672682 Compare May 6, 2024 00:21
@matt2e matt2e merged commit 9e108ee into main May 6, 2024
10 checks passed
@matt2e matt2e deleted the matt2e/immutable-module-context-2 branch May 6, 2024 00:24
@worstell worstell added the approved Marks an already closed PR as approved label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Marks an already closed PR as approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants