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

Manager.createChildContext should deep-copy the locale #896

Closed
foundrytom opened this issue Apr 17, 2023 · 0 comments · Fixed by #900
Closed

Manager.createChildContext should deep-copy the locale #896

foundrytom opened this issue Apr 17, 2023 · 0 comments · Fixed by #900
Assignees

Comments

@foundrytom
Copy link
Collaborator

foundrytom commented Apr 17, 2023

What

createChildContext should copy the locale vs sharing.

Why

This method is used to create 'related but detached' contexts, sharing a locale couples them

Acceptance Criteria

  • The new child context does not share any ptr-referenced properties with the parent context (aside from the managerState).
  • The new context has a locale equal to the parent.

Out of scope

  • New host documentation
@foundrytom foundrytom added this to the Core stable milestone Apr 17, 2023
@foundrytom foundrytom self-assigned this Apr 18, 2023
foundrytom added a commit to foundrytom/OpenAssetIO that referenced this issue Apr 18, 2023
`createChildContext` is meant to produce a new context that is
associated with the parent. Speicifcally, for when you wish to modify an
existing context in paralell. Sharing a locale (as we were only copying
the ptr) meant that modifing the locale in one would update the locale
in another. This is confusing and undesirable.

Now the locale `TraitsData` is deep-copied.

Closes OpenAssetIO#896

Signed-off-by: Tom Cowland <tom@foundry.com>
foundrytom added a commit to foundrytom/OpenAssetIO that referenced this issue Apr 18, 2023
`createChildContext` is meant to produce a new context that is
associated with the parent. Speicifcally, for when you wish to modify an
existing context in paralell. Sharing a locale (as we were only copying
the ptr) meant that modifing the locale in one would update the locale
in another. This is confusing and undesirable.

Now the locale `TraitsData` is deep-copied.

Closes OpenAssetIO#896

Signed-off-by: Tom Cowland <tom@foundry.com>
foundrytom added a commit to foundrytom/OpenAssetIO that referenced this issue Apr 18, 2023
`createChildContext` is meant to produce a new context that is
associated with the parent. Speicifcally, for when you wish to modify an
existing context in paralell. Sharing a locale (as we were only copying
the ptr) meant that modifing the locale in one would update the locale
in another. This is confusing and undesirable.

Now the locale `TraitsData` is deep-copied.

Closes OpenAssetIO#896

Signed-off-by: Tom Cowland <tom@foundry.com>
foundrytom added a commit to foundrytom/OpenAssetIO that referenced this issue Apr 18, 2023
`createChildContext` is meant to produce a new context that is
associated with the parent. Speicifcally, for when you wish to modify an
existing context in paralell. Sharing a locale (as we were only copying
the ptr) meant that modifing the locale in one would update the locale
in another. This is confusing and undesirable.

Now the locale `TraitsData` is deep-copied.

Closes OpenAssetIO#896

Signed-off-by: Tom Cowland <tom@foundry.com>
foundrytom added a commit to foundrytom/OpenAssetIO that referenced this issue Apr 18, 2023
`createChildContext` is meant to produce a new context that is
associated with the parent. Speicifcally, for when you wish to modify an
existing context in paralell. Sharing a locale (as we were only copying
the ptr) meant that modifing the locale in one would update the locale
in another. This is confusing and undesirable.

Now the locale `TraitsData` is deep-copied.

Closes OpenAssetIO#896

Signed-off-by: Tom Cowland <tom@foundry.com>
foundrytom added a commit to foundrytom/OpenAssetIO that referenced this issue Apr 19, 2023
`createChildContext` is meant to produce a new context that is
associated with the parent. Speicifcally, for when you wish to modify an
existing context in paralell. Sharing a locale (as we were only copying
the ptr) meant that modifing the locale in one would update the locale
in another. This is confusing and undesirable.

Now the locale `TraitsData` is deep-copied.

Closes OpenAssetIO#896

Signed-off-by: Tom Cowland <tom@foundry.com>
elliotcmorris pushed a commit to foundrytom/OpenAssetIO that referenced this issue Apr 20, 2023
`createChildContext` is meant to produce a new context that is
associated with the parent. Speicifcally, for when you wish to modify an
existing context in paralell. Sharing a locale (as we were only copying
the ptr) meant that modifing the locale in one would update the locale
in another. This is confusing and undesirable.

Now the locale `TraitsData` is deep-copied.

Closes OpenAssetIO#896

Signed-off-by: Tom Cowland <tom@foundry.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant