bevy/crates
Zhixing Zhang 8fa500d016
Asset v2: Asset path serialization fix (#9756)
# Objective

- Silence `Failed to send DropEvent for StrongHandle "SendError(..)"`
errors when `StrongHandle` were dropped during application shutdown.
- Re-export `BoxedFuture` considering that it's used everywhere in
bevy_asset
- Fixed an issue introduced by #9729. 
  ```
Asset 'final_gather.rgen' encountered an error in
dust_render::shader::spirv::SpirvLoader: Failed to deserialize asset
meta: SpannedError { code: InvalidValueForType { expected: "string
AssetPath", found: "a sequence" }, position: Position { line: 9, col: 24
} }
  ```
Basically, for processed assets with dependencies, bevy will serialize
the metafile as follows:
  ```
  (
    meta_format_version: "1.0",
    processed_info: Some((
hash: (203, 239, 108, 156, 180, 23, 157, 217, 159, 36, 158, 193, 185,
253, 242, 156),
full_hash: (77, 58, 30, 200, 21, 180, 221, 133, 151, 83, 247, 47, 193,
70, 228, 97),
        process_dependencies: [
            (
full_hash: (56, 46, 55, 118, 3, 6, 213, 250, 124, 26, 153, 87, 15, 85,
4, 89),
                path: ("standard.glsl"), # <<---------- See here
            ),
        ],
    )),
    asset: Load(
        loader: "dust_render::shader::spirv::SpirvLoader",
        settings: (),
    ),
  )
  ```
`AssetPath` gets serialized as `("standard.glsl")` which was then
deserialized as a sequence instead of our `AssetPath`.

## Solution

- Serialize `AssetPath` directly as a string instead. The above metafile
would be serialized as follows:
 ```
  (
    meta_format_version: "1.0",
    processed_info: Some((
hash: (203, 239, 108, 156, 180, 23, 157, 217, 159, 36, 158, 193, 185,
253, 242, 156),
full_hash: (77, 58, 30, 200, 21, 180, 221, 133, 151, 83, 247, 47, 193,
70, 228, 97),
        process_dependencies: [
            (
full_hash: (56, 46, 55, 118, 3, 6, 213, 250, 124, 26, 153, 87, 15, 85,
4, 89),
path: "standard.glsl", # <<------- No longer a tuple struct
            ),
        ],
    )),
    asset: Load(
        loader: "dust_render::shader::spirv::SpirvLoader",
        settings: (),
    ),
  )
  ```

---
2023-09-13 05:43:01 +00:00
..
bevy_a11y Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_animation Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
bevy_app Replace IntoSystemSetConfig with IntoSystemSetConfigs (#9247) 2023-09-05 17:15:27 +00:00
bevy_asset Asset v2: Asset path serialization fix (#9756) 2023-09-13 05:43:01 +00:00
bevy_audio Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
bevy_core Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
bevy_core_pipeline Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
bevy_derive bevy_derive: Fix #[deref] breaking other attributes (#9551) 2023-08-28 17:36:18 +00:00
bevy_diagnostic Add DiagnosticsStore::iter_mut (#9679) 2023-09-03 13:26:13 +00:00
bevy_dylib Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_dynamic_plugin Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_ecs Clarify a comment in Option WorldQuery impl (#9749) 2023-09-11 19:27:21 +00:00
bevy_ecs_compile_fail_tests Fix CI for Rust 1.72 (#9562) 2023-08-25 12:34:24 +00:00
bevy_encase_derive Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_gilrs Refactor EventReader::iter to read (#9631) 2023-08-30 14:20:03 +00:00
bevy_gizmos Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
bevy_gltf Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
bevy_hierarchy Remove useless single tuples and trailing commas (#9720) 2023-09-08 21:46:54 +00:00
bevy_input Refactor EventReader::iter to read (#9631) 2023-08-30 14:20:03 +00:00
bevy_internal Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
bevy_log Update tracy-client requirement from 0.15 to 0.16 (#9436) 2023-08-15 07:45:21 +00:00
bevy_macro_utils Add some more helpful errors to BevyManifest when it doesn't find Cargo.toml (#9207) 2023-07-19 12:05:04 +00:00
bevy_macros_compile_fail_tests bevy_derive: Fix #[deref] breaking other attributes (#9551) 2023-08-28 17:36:18 +00:00
bevy_math Fix erronenous glam version (#9653) 2023-08-31 12:55:17 +00:00
bevy_mikktspace Fix erronenous glam version (#9653) 2023-08-31 12:55:17 +00:00
bevy_pbr Fix wireframe for skinned/morphed meshes (#9734) 2023-09-11 19:14:15 +00:00
bevy_ptr Put #[repr(transparent)] attr to bevy_ptr types (#9068) 2023-07-14 18:55:15 +00:00
bevy_reflect Remove useless single tuples and trailing commas (#9720) 2023-09-08 21:46:54 +00:00
bevy_reflect_compile_fail_tests Fix CI for Rust 1.72 (#9562) 2023-08-25 12:34:24 +00:00
bevy_render Implement Reflect for Mesh (#9779) 2023-09-12 21:30:16 +00:00
bevy_scene Remove useless single tuples and trailing commas (#9720) 2023-09-08 21:46:54 +00:00
bevy_sprite TextureAtlasBuilder padding (#9494) 2023-09-08 15:02:48 +00:00
bevy_tasks elaborate on TaskPool and bevy tasks (#8750) 2023-08-11 21:07:28 +00:00
bevy_text Remove z-axis scaling in extract_text2d_sprite (#9733) 2023-09-11 19:12:23 +00:00
bevy_time Remove useless single tuples and trailing commas (#9720) 2023-09-08 21:46:54 +00:00
bevy_transform Replace IntoSystemSetConfig with IntoSystemSetConfigs (#9247) 2023-09-05 17:15:27 +00:00
bevy_ui Add tests to bevy_ui::Layout (#9781) 2023-09-12 22:08:27 +00:00
bevy_utils Copy on Write AssetPaths (#9729) 2023-09-09 23:15:10 +00:00
bevy_window Refer to "macOS", not "macOS X". (#9704) 2023-09-05 19:06:08 +00:00
bevy_winit Fix some nightly warnings (#9672) 2023-09-02 18:35:06 +00:00