Skip to content

Commit e3e3973

Browse files
Add some missing migration guides from older PRs (#1850)
1 parent 291bda9 commit e3e3973

File tree

30 files changed

+292
-22
lines changed

30 files changed

+292
-22
lines changed

generate-release/src/github_client.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -198,19 +198,6 @@ impl GithubClient {
198198

199199
prs.append(&mut prs_in_page);
200200
page += 1;
201-
if let Some(pr) = prs.last() {
202-
if let Some(datetime_utc) = datetime_utc {
203-
if let Some(closed_at) = pr.closed_at {
204-
if closed_at < datetime_utc {
205-
println!(
206-
"\x1b[93mSkipping PR closed before the target datetime {}\x1b[0m",
207-
closed_at
208-
);
209-
break;
210-
}
211-
}
212-
}
213-
}
214201
}
215202

216203
// Make sure the older PRs from the last page aren't returned

generate-release/src/helpers.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,16 @@ pub fn get_merged_prs(
1919
.context("Failed to get commits")?;
2020
println!("Found {} commits", commits.len());
2121

22-
println!("Getting list of all merged PRs from {from} to {to} with label {label:?}");
22+
println!("Getting list of all merged PRs with label {label:?}");
2323

2424
let base_commit = client.get_commit(from, BevyRepo::Bevy)?;
2525
let base_commit_date = &base_commit.commit.committer.date[0..10];
2626

2727
// We also get the list of merged PRs in batches instead of getting them separately for each commit
28-
let prs = client.get_issues_and_prs(
29-
BevyRepo::Bevy,
30-
IssueState::Merged,
31-
Some(base_commit_date),
32-
label,
33-
)?;
28+
// We can't set a `since` date, as the PRs requested are filtered by date opened, not date merged
29+
let prs = client.get_issues_and_prs(BevyRepo::Bevy, IssueState::Merged, None, label)?;
3430
println!(
35-
"Found {} merged PRs and {} commits since {} (the base commit date)",
36-
prs.len(),
31+
"Found {} commits since {} (the base commit date)",
3732
commits.len(),
3833
base_commit_date
3934
);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- `Text2dBounds` has been replaced with `TextBounds`, and it now accepts `Option`s to the bounds, instead of using `f32::INFINITY` to indicate lack of bounds
2+
- Textsizes should be changed, dividing the current size with 1.2 will result in the same size as before.
3+
- `TextSettings` struct is removed
4+
- Feature `subpixel_alignment` has been removed since cosmic-text already does this automatically
5+
- TextBundles and things rendering texts requires the `CosmicBuffer` Component on them as well
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
In areas where these implementations where being used, you can now add `from_static` in order to get the original specialised implementation which avoids creating an `Arc` internally.
2+
3+
```rust
4+
// Before
5+
let asset_path = AssetPath::from("my/path/to/an/asset.ext");
6+
7+
// After
8+
let asset_path = AssetPath::from_static("my/path/to/an/asset.ext");
9+
```
10+
11+
To be clear, this is only required if you wish to maintain the performance benefit that came with the specialisation. Existing code is _not_ broken by this change.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!-- TODO -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- `TaskPooolThreadAssignmentPolicy` now has two additional fields: `on_thread_spawn` and `on_thread_destroy`. Please consider defaulting them to `None`.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- Updated to `wgpu` 0.20, `naga` 0.20, and `naga_oil` 0.14
2+
- All of Naga’s [`Capabilities`](https://docs.rs/naga/latest/naga/valid/struct.Capabilities.html) should now be properly detected and supported.
3+
- Timestamps inside encoders are now disallowed on WebGPU to follow the spec (they still work on native). Use the `TIMESTAMP_QUERY_INSIDE_ENCODERS ` wgpu feature to check for support.
4+
- You can now use many numeric built-ins in `const` contexts (eg. `abs`, `cos`, `floor`, `max`, etc, see https://github.com/gfx-rs/wgpu/blob/v0.20/CHANGELOG.md#wgsl-const-evaluation-for-many-more-built-ins for the whole list)
5+
- You can now use Subgroup operations in shaders on supported hardware (see https://github.com/gfx-rs/wgpu/blob/v0.20/CHANGELOG.md#subgroup-operations for limitations and which features to check)
6+
- `u64` and `i64` are now supported in shaders on supported hardware (requires the `SHADER_INT64 ` feature, supported on desktop Vulkan, DX12 with DXC, and Metal with MSL 2.3+)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-
2+
- Change `CameraOutputMode` to use `ClearColorConfig` instead of `LoadOp`.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
If accessing children, use `Assets<GltfNode>` resource to get the actual child object.
2+
3+
__Before__
4+
5+
```rs
6+
fn gltf_print_first_node_children_system(gltf_component_query: Query<Handle<Gltf>>, gltf_assets: Res<Assets<Gltf>>, gltf_nodes: Res<Assets<GltfNode>>) {
7+
for gltf_handle in gltf_component_query.iter() {
8+
let gltf_root = gltf_assets.get(gltf_handle).unwrap();
9+
let first_node_handle = gltf_root.nodes.get(0).unwrap();
10+
let first_node = gltf_nodes.get(first_node_handle).unwrap();
11+
let first_child = first_node.children.get(0).unwrap();
12+
println!("First nodes child node name is {:?)", first_child.name);
13+
}
14+
}
15+
```
16+
17+
__After__
18+
19+
```rs
20+
fn gltf_print_first_node_children_system(gltf_component_query: Query<Handle<Gltf>>, gltf_assets: Res<Assets<Gltf>>, gltf_nodes: Res<Assets<GltfNode>>) {
21+
for gltf_handle in gltf_component_query.iter() {
22+
let gltf_root = gltf_assets.get(gltf_handle).unwrap();
23+
let first_node_handle = gltf_root.nodes.get(0).unwrap();
24+
let first_node = gltf_nodes.get(first_node_handle).unwrap();
25+
let first_child_handle = first_node.children.get(0).unwrap();
26+
let first_child = gltf_nodes.get(first_child_handle).unwrap();
27+
println!("First nodes child node name is {:?)", first_child.name);
28+
}
29+
}
30+
```
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Replace the `glyph_id` and `subpixel_offset` of a few text atlas APIs by a single `place_glyph: PlacedGlyph` parameter trivially combining the two.
2+
- `DynamicTextureAtlasBuilder::add_texture` now takes a `&mut Image`, rather than a `Handle<Image>`. To access this, fetch the underlying image using `Assets<Image>::get_mut`.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- If you are implementing `EntityMapper` yourself, you can use the below as a stub implementation:
2+
3+
```rust
4+
fn mappings(&self) -> impl Iterator<Item = (Entity, Entity)> {
5+
unimplemented!()
6+
}
7+
```
8+
9+
- If you were using `EntityMapper` as a trait object (`dyn EntityMapper`), instead use `dyn DynEntityMapper` and its associated methods.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!-- TODO -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!-- TODO -->
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- In code which uses DebugName you should now use the Display implementation rather than the Debug implementation (ie {} instead of {:?} if you were printing it out).
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- The `and_then` run condition method has been replaced with the `and` run condition method.
2+
- The `or_else` run condition method has been replaced with the `or` run condition method.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- `RegularPolygon` now uses `u32` instead of `usize` for the number of sides
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!-- TODO -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- All gizmos now take `u32` instead of `usize` for their resolution/subdivision/segment counts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- All primitive mesh builders now take `u32` instead of `usize` for their resolution/subdivision/segment counts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- `World::inspect_entity` now returns an `Iterator` instead of a `Vec`. If you need a `Vec`, immediately collect the iterator: `world.inspect_entity(entity).collect<Vec<_>>()`
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
If you are overriding the `Ctrl+C` handler then you should call `TerminalCtrlCHandlerPlugin::gracefully_exit` from your handler. It will tell the app to exit.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- `BackgroundColor` no longer tints the color of images in `ImageBundle` or `ButtonBundle`. Set `UiImage::color` to tint images instead.
2+
- The default texture for `UiImage` is now a transparent white square. Use `UiImage::solid_color` to quickly draw debug images.
3+
- The default value for `BackgroundColor` and `BorderColor` is now transparent. Set the color to white manually to return to previous behavior.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Add feature pbr_anisotropy_texture if you are using that texture in any standard materials.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
n/a
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
The trait method `bevy_asset::io::AssetReader::read` (and `read_meta`) now return an opaque type instead of a boxed trait object. Implementors of these methods should change the type signatures appropriately
2+
3+
```rust
4+
impl AssetReader for MyReader {
5+
// Before
6+
async fn read<'a>(&'a self, path: &'a Path) -> Result<Box<Reader<'a>>, AssetReaderError> {
7+
let reader = // construct a reader
8+
Box::new(reader) as Box<Reader<'a>>
9+
}
10+
11+
// After
12+
async fn read<'a>(&'a self, path: &'a Path) -> Result<impl Reader + 'a, AssetReaderError> {
13+
// create a reader
14+
}
15+
}
16+
```
17+
18+
`bevy::asset::io::Reader` is now a trait, rather than a type alias for a trait object. Implementors of `AssetLoader::load` will need to adjust the method signature accordingly
19+
20+
```rust
21+
impl AssetLoader for MyLoader {
22+
async fn load<'a>(
23+
&'a self,
24+
// Before:
25+
reader: &'a mut bevy::asset::io::Reader,
26+
// After:
27+
reader: &'a mut dyn bevy::asset::io::Reader,
28+
_: &'a Self::Settings,
29+
load_context: &'a mut LoadContext<'_>,
30+
) -> Result<Self::Asset, Self::Error> {
31+
}
32+
```
33+
34+
Additionally, implementors of `AssetReader` that return a type implementing `futures_io::AsyncRead` and `AsyncSeek` might need to explicitly implement `bevy::asset::io::Reader` for that type.
35+
36+
```rust
37+
impl bevy::asset::io::Reader for MyAsyncReadAndSeek {}
38+
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`accesskit`’s `Role::StaticText` variant has been renamed to `Role::Label`.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Most instances of `dyn Reflect` should be changed to `dyn PartialReflect` which is less restrictive, however trait bounds should generally stay as `T: Reflect`.
2+
- The new `PartialReflect::{as_partial_reflect, as_partial_reflect_mut, into_partial_reflect, try_as_reflect, try_as_reflect_mut, try_into_reflect}` methods as well as `Reflect::{as_reflect, as_reflect_mut, into_reflect}` will need to be implemented for manual implementors of `Reflect`.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`UiPlugin` has a new field `enable_rendering`. If set to false, the UI’s rendering systems won’t be added to the `RenderApp` and no UI elements will be drawn. The layout and interaction components will still be updated as normal.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The `ZIndex` enum has been split into two separate components `ZIndex` (which replaces `ZIndex::Local`) and `GlobalZIndex` (which replaces `ZIndex::Global`). An entity can have both a `ZIndex` and `GlobalZIndex`, in comparisons `ZIndex` breaks ties if two `GlobalZindex` values are equal.

0 commit comments

Comments
 (0)