Ben Frankel

Results 109 comments of Ben Frankel

`load_internal_binary_asset!` doesn't have this issue, but it's awkward to use. Bevy doesn't seem to use `embedded_asset!` anywhere internally -- it only uses `load_internal_binary_asset!` -- so bugs like this take longer...

The RFC for [postfix macros](https://github.com/rust-lang/rfcs/pull/2442) would make this pattern so much nicer. Waiting for a language feature isn't practical, though. ```rust let window = window_query.single().or_return!("optional warning msg"); ```

`unpack` and `assume` seem very similar to [`Option::ok_or`](https://doc.rust-lang.org/std/option/enum.Option.html#method.ok_or).

IMO better error handling shouldn't block a rename from e.g. `single`, `get_single` to `single.unwrap`, `single`. It's a footgun today, and it won't require any design work to solve.

I published a crate for the macro approach: https://github.com/benfrankel/tiny_bail. I used (an earlier version of) these macros during the game jam and they were exceptionally convenient.

As part of this, I would also propose considering `Spawn::spawn_with` as a generalization of `Spawn::spawn`: - `spawn(bundle)` = `spawn_empty` + `add(insert(bundle))` - `spawn_with(command)` = `spawn_empty` + `add(command)`

I think this could use a working group once there's enough bandwidth, since it'll require design work and has cross-cutting impact.

I haven't looked at the code, but: IMO this approach is fine for 0.14.1, but a state disabling / enabling approach would be preferable for 0.15.

Is this issue resolved? See https://github.com/bevyengine/bevy/pull/14160.

The URL for the query is `https://api.imf.org/external/sdmx/3.0/structure/dataflow/IMF.STA/BOP/+?references=all`, and here's an offending snippet from the XML response: ```xml Short Source Citation A brief reference to the source of data or information...