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

Do not allow shared object passed by value #799

Merged
merged 2 commits into from
Mar 12, 2022
Merged

Conversation

lxfind
Copy link
Contributor

@lxfind lxfind commented Mar 12, 2022

Doing so prevents shared objects being transferred, deleted or wrapped.

Copy link
Collaborator

@gdanezis gdanezis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This takes care of a major headache @asonnino

@lxfind lxfind force-pushed the forbid-consume-shared-object branch from a0ca797 to acebade Compare March 12, 2022 01:42
@lxfind lxfind merged commit c623e0a into main Mar 12, 2022
@lxfind lxfind deleted the forbid-consume-shared-object branch March 12, 2022 02:36
@ppoliani
Copy link
Contributor

ppoliani commented Jun 1, 2023

@lxfind may I ask what's the rational behind this decision? I opened an issue describing a use case which doesn't seem to be feasible on Sui due to this (and not being able to turn owned objects into shared) #12271.

Doing so prevents shared objects being transferred, deleted or wrapped.

Why do we need such a strict limitation. Correct me if I'm wrong, but I don't see how this poses an issue.

  • You still can't delete objects that don't belong to the same module
  • Making a shared object ownable again turns out to be useful. I shared an example in the issue I shared above.
  • Wrapping is determined by the store semantics, so that doesn't look like an issue either.

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.

3 participants