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

[Merged by Bors] - bevy_ptr standalone crate #4653

Conversation

jakobhellermann
Copy link
Contributor

Objective

The pointer types introduced in #3001 are useful not just in bevy_ecs, but also in crates like bevy_reflect (#4475) or even outside of bevy.

Solution

Extract Ptr<'a>, PtrMut<'a>, OwnedPtr<'a>, ThinSlicePtr<'a, T> and UnsafeCellDeref from bevy_ecs::ptr into bevy_ptr.

Note: bevy_ecs still reexports the bevy_ptr as bevy_ecs::ptr so that crates like bevy_transform can use the Bundle derive without needing to depend on bevy_ptr themselves.

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label May 4, 2022
crates/bevy_ptr/Cargo.toml Outdated Show resolved Hide resolved
@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change C-Usability A targeted quality-of-life change that makes Bevy easier to use X-Controversial There is active debate or serious implications around merging this PR and removed S-Needs-Triage This issue needs to be labelled labels May 4, 2022
@alice-i-cecile
Copy link
Member

Very reasonable. I definitely think these types are widely useful, and I'd enjoy being able to contribute back to the broader ecosystem where we can.

@cart if you're on board with this remember to make an A-Pointers label :)

@mockersf
Copy link
Member

mockersf commented May 4, 2022

Could you add the new crate to https://github.com/bevyengine/bevy/blob/main/tools/publish.sh?

@TheRawMeatball
Copy link
Member

Also, is this change really that controversial?

@alice-i-cecile
Copy link
Member

Also, is this change really that controversial?

We still need to have a high-level discussion about our crate splitting strategy. That said, I'm going to add this to https://github.com/orgs/bevyengine/projects/6/views/1 now that Francois has approved it.

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label May 4, 2022
@cart
Copy link
Member

cart commented May 4, 2022

bors r+

bors bot pushed a commit that referenced this pull request May 4, 2022
# Objective

The pointer types introduced in #3001 are useful not just in `bevy_ecs`, but also in crates like `bevy_reflect` (#4475) or even outside of bevy.

## Solution

Extract `Ptr<'a>`, `PtrMut<'a>`, `OwnedPtr<'a>`, `ThinSlicePtr<'a, T>` and `UnsafeCellDeref` from `bevy_ecs::ptr` into `bevy_ptr`.

**Note:** `bevy_ecs` still reexports the `bevy_ptr` as `bevy_ecs::ptr` so that crates like `bevy_transform` can use the `Bundle` derive without needing to depend on `bevy_ptr` themselves.
@bors bors bot changed the title bevy_ptr standalone crate [Merged by Bors] - bevy_ptr standalone crate May 4, 2022
@bors bors bot closed this May 4, 2022
@jakobhellermann jakobhellermann deleted the bevy-ptr-standalone-crate branch May 4, 2022 20:11
robtfm pushed a commit to robtfm/bevy that referenced this pull request May 10, 2022
# Objective

The pointer types introduced in bevyengine#3001 are useful not just in `bevy_ecs`, but also in crates like `bevy_reflect` (bevyengine#4475) or even outside of bevy.

## Solution

Extract `Ptr<'a>`, `PtrMut<'a>`, `OwnedPtr<'a>`, `ThinSlicePtr<'a, T>` and `UnsafeCellDeref` from `bevy_ecs::ptr` into `bevy_ptr`.

**Note:** `bevy_ecs` still reexports the `bevy_ptr` as `bevy_ecs::ptr` so that crates like `bevy_transform` can use the `Bundle` derive without needing to depend on `bevy_ptr` themselves.
exjam pushed a commit to exjam/bevy that referenced this pull request May 22, 2022
# Objective

The pointer types introduced in bevyengine#3001 are useful not just in `bevy_ecs`, but also in crates like `bevy_reflect` (bevyengine#4475) or even outside of bevy.

## Solution

Extract `Ptr<'a>`, `PtrMut<'a>`, `OwnedPtr<'a>`, `ThinSlicePtr<'a, T>` and `UnsafeCellDeref` from `bevy_ecs::ptr` into `bevy_ptr`.

**Note:** `bevy_ecs` still reexports the `bevy_ptr` as `bevy_ecs::ptr` so that crates like `bevy_transform` can use the `Bundle` derive without needing to depend on `bevy_ptr` themselves.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

The pointer types introduced in bevyengine#3001 are useful not just in `bevy_ecs`, but also in crates like `bevy_reflect` (bevyengine#4475) or even outside of bevy.

## Solution

Extract `Ptr<'a>`, `PtrMut<'a>`, `OwnedPtr<'a>`, `ThinSlicePtr<'a, T>` and `UnsafeCellDeref` from `bevy_ecs::ptr` into `bevy_ptr`.

**Note:** `bevy_ecs` still reexports the `bevy_ptr` as `bevy_ecs::ptr` so that crates like `bevy_transform` can use the `Bundle` derive without needing to depend on `bevy_ptr` themselves.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Controversial There is active debate or serious implications around merging this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants