diff --git a/.github/workflows/todos.yml b/.github/workflows/todos.yml new file mode 100644 index 0000000000..e986ee7355 --- /dev/null +++ b/.github/workflows/todos.yml @@ -0,0 +1,33 @@ +name: ☑️ Create issues from TODOs + +on: + workflow_dispatch: + inputs: + importAll: + default: 'false' + required: false + type: boolean + description: Enable, if you want to import all TODOs. Runs on checked out branch! Only use if you're sure what you are doing. + push: + branches: + - main + +permissions: + issues: write + repository-projects: read + contents: read + +jobs: + todos: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Run Issue Bot + uses: derjuulsn/todo-issue@main + with: + blobLinesBefore: 2 + label: code:todo + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/crates/bones_asset/src/lib.rs b/crates/bones_asset/src/lib.rs index f9393820d0..4208db5066 100644 --- a/crates/bones_asset/src/lib.rs +++ b/crates/bones_asset/src/lib.rs @@ -43,7 +43,7 @@ pub struct AssetProviders { pub type ResAssetProviders<'a> = bones_ecs::system::Res<'a, AssetProvidersResource>; /// The type of the [`AssetProviders`] resource. -// TODO: Make a custom system parameter to prevent needing to manualy .borrow() this resource. +// TODO: Create custom system parameter to prevent needing to manualy `.borrow()` `AssetProvidersResource`. #[derive(Deref, DerefMut, Clone, TypeUlid)] #[ulid = "01GNWY5HKV5JZQRKG20ANJXHCK"] diff --git a/crates/bones_bevy_asset/src/lib.rs b/crates/bones_bevy_asset/src/lib.rs index 42246a41e9..126a2243fd 100644 --- a/crates/bones_bevy_asset/src/lib.rs +++ b/crates/bones_bevy_asset/src/lib.rs @@ -33,7 +33,7 @@ pub mod _private { } /// Trait that may be derived to implement a Bevy asset type. -// TODO: Integrate or move HasLoadProgress with BonesBevyAsset. +// TODO: Integrate or move `HasLoadProgress` to `BonesBevyAsset`. pub trait BonesBevyAsset: TypeUlid + Asset { /// Install the asset loader for this type. fn install_asset(app: &mut App); diff --git a/crates/bones_bevy_renderer/Cargo.toml b/crates/bones_bevy_renderer/Cargo.toml index 27d71a9a39..6719313f95 100644 --- a/crates/bones_bevy_renderer/Cargo.toml +++ b/crates/bones_bevy_renderer/Cargo.toml @@ -16,7 +16,8 @@ glam = { version = "0.23", features = ["serde"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" serde_yaml = "0.9" -# TODO: Update when PR merged: https://github.com/forbjok/bevy_simple_tilemap/pull/9 +# TODO: Update `bevy_simple_tilemap` when our PR is merged. +# https://github.com/forbjok/bevy_simple_tilemap/pull/9 bevy_prototype_lyon = "0.8" # Disable default features to remove rayon par-iter, is not performant. Once https://github.com/forbjok/bevy_simple_tilemap/pull/17 is merged, # switch off fork back to original crate. diff --git a/crates/bones_bevy_renderer/src/lib.rs b/crates/bones_bevy_renderer/src/lib.rs index 4f4979687e..e13c0e02e7 100644 --- a/crates/bones_bevy_renderer/src/lib.rs +++ b/crates/bones_bevy_renderer/src/lib.rs @@ -144,7 +144,7 @@ fn sync_sprites( let world = world_resource.world(); - // TODO: Evaluate cost of calling this every frame + // TODO: Evaluate cost of initializing bones render components every frame. world.components.init::(); world.components.init::(); @@ -419,9 +419,9 @@ fn sync_tilemaps( tile_map.clear(); tile_map.set_tiles(tile_iter); - // TODO: This is probably a bug in bevy_simple_tilemap. If the tilemap atlas has been - // changed, and one of the tiles in the map had a tile index greater than the max tile - // count in the new atlas, the map renderer will panic. + // This is maybe a bug in bevy_simple_tilemap. If the tilemap atlas has been changed, + // and one of the tiles in the map had a tile index greater than the max tile count in + // the new atlas, the map renderer will panic. // // This shouldn't happen because we made sure to `clear()` the tiles and ensured that // all the new tile indexes are clamped, but apparently the chunks are updated a frame diff --git a/crates/bones_ecs/Cargo.toml b/crates/bones_ecs/Cargo.toml index 21409876d6..275f8b0757 100644 --- a/crates/bones_ecs/Cargo.toml +++ b/crates/bones_ecs/Cargo.toml @@ -24,7 +24,7 @@ keysize32 = [] aligned-vec = "0.5" anyhow = "1.0" atomic_refcell = "0.1" -# TODO: Replace with our own macros +# TODO: Replace Bevy's `Deref` and `DerefMut` derives with our own macros. bevy_derive = "0.10" bitset-core = "0.1" bytemuck = "1.12" diff --git a/crates/bones_ecs/src/components/untyped.rs b/crates/bones_ecs/src/components/untyped.rs index 3b3247ae6d..21ff70ad50 100644 --- a/crates/bones_ecs/src/components/untyped.rs +++ b/crates/bones_ecs/src/components/untyped.rs @@ -290,7 +290,7 @@ impl UntypedComponentStore { .map(|(_i, x)| x), ) } else { - // TODO: More tests for this iterator + // TODO: Add more tests for the ZST component iterator. let mut idx = 0usize; let max_id = self.max_id; let iterator = std::iter::from_fn(move || loop { diff --git a/crates/bones_ecs/src/error.rs b/crates/bones_ecs/src/error.rs index 92fa079ed0..6778ef9586 100644 --- a/crates/bones_ecs/src/error.rs +++ b/crates/bones_ecs/src/error.rs @@ -1,7 +1,8 @@ use std::error::Error; /// The types of errors used throughout the ECS. -// TODO: Re-evaluate possible errors. Some of them may not be used anymore. +// TODO: Re-evaluate `EcsError` variants. +// Some of them may not be used anymore. #[derive(Debug, thiserror::Error)] pub enum EcsError { /// A resource was not initialized in the [`World`][crate::World] but the diff --git a/crates/bones_ecs/src/resources.rs b/crates/bones_ecs/src/resources.rs index f5854eeba0..c05719fa01 100644 --- a/crates/bones_ecs/src/resources.rs +++ b/crates/bones_ecs/src/resources.rs @@ -28,8 +28,9 @@ pub struct UntypedResourceInfo { /// The memory layout of the resource pub layout: Layout, /// Cell containing the raw pointer to the resource's data - // TODO: Evaluate possibility of avoiding an `Arc` here, and just passing references with a - // lifetime for acessing it, instead of cloning the Arc like we do here. + // TODO: Evaluate possibility of avoiding an `Arc` clone. + // We might be able to just just pass references with a lifetime for acessing it, + // instead of cloning the Arc like we do here. pub cell: Arc>, /// A function that may be called to clone the resource from one pointer to another. pub clone_fn: unsafe extern "C" fn(*const u8, *mut u8), @@ -323,7 +324,7 @@ mod test { resources.insert(A(vec![7, 8, 9])); assert_eq!(resources.get::().borrow().0, vec![7, 8, 9]); - // TODO: Split into more focused test for cloning + // TODO: Create more focused test for cloning resources. assert_eq!(r2.get::().borrow().0, vec![3, 2, 1]); resources.insert(B(1)); diff --git a/crates/bones_matchmaker/src/proxy.rs b/crates/bones_matchmaker/src/proxy.rs index 14253c542d..af64a6bbea 100644 --- a/crates/bones_matchmaker/src/proxy.rs +++ b/crates/bones_matchmaker/src/proxy.rs @@ -82,7 +82,7 @@ async fn impl_proxy(match_info: MatchInfo, clients: Vec) -> anyhow:: .detach(); // Spawn task for handling the client's unreliable messages - // TODO: De-duplicate this code a little? + // TODO: De-duplicate matchmaker proxy code if possible. task_pool .spawn(async move { let result = async { diff --git a/deny.toml b/deny.toml index b9e5099f64..99193c8d9a 100644 --- a/deny.toml +++ b/deny.toml @@ -18,7 +18,8 @@ allow = [ "CC0-1.0", "ISC", "BSD-2-Clause", - "MPL-2.0", # TODO(zicklag): I believe MPL is fine for us, but maybe double-check this. + # TODO: Validate that it is not a problem for us to have MPL licensed dependencies. + "MPL-2.0", "OpenSSL", ] default = "deny"