diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5df0fd78..0a4c8e5e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -473,9 +473,6 @@ jobs: with: ref: ${{ inputs.ref || github.ref }} - - name: Update rustfmt - run: rustup update - - name: Check id: check run: cargo fmt --all -- --check @@ -505,9 +502,6 @@ jobs: with: ref: ${{ inputs.ref || github.ref }} - - name: Update components - run: rustup update - - name: Install Clippy run: rustup component add clippy diff --git a/Cargo.lock b/Cargo.lock index ffcef763..90ec0a3c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -805,9 +805,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907d8581360765417f8f2e0e7d602733bbed60156b4465b7617243689ef9b83d" +checksum = "47de7e88bbbd467951ae7f5a6f34f70d1b4d9cfce53d5fd70f74ebe118b3db56" dependencies = [ "jobserver", "libc", @@ -4020,7 +4020,7 @@ checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" [[package]] name = "playdate" -version = "0.2.1" +version = "0.2.2" dependencies = [ "playdate-controls", "playdate-display", diff --git a/api/playdate/Cargo.toml b/api/playdate/Cargo.toml index c0697f91..af486b37 100644 --- a/api/playdate/Cargo.toml +++ b/api/playdate/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "playdate" -version = "0.2.1" +version = "0.2.2" readme = "README.md" description = "High-level Playdate API" keywords = ["playdate", "sdk", "api", "gamedev"] diff --git a/cargo/src/build/mod.rs b/cargo/src/build/mod.rs index bdbe81da..aa363341 100644 --- a/cargo/src/build/mod.rs +++ b/cargo/src/build/mod.rs @@ -209,54 +209,54 @@ pub fn build(cfg: &Config, tree: &MetaDeps) -> CargoResult> { let mut crate_types_cache = BTreeMap::new(); - let removed = - roots.extract_if(|root| { - let tk = root.node().target().kind(); - let ck = root.node().unit().platform; - - log::trace!(" check {} {}", tk.description(), match ck { - CompileKind::Host => "host", - CompileKind::Target(ref kind) => kind.short_name(), - }); - - if reserved_roots.contains(root) { - log::trace!(" excluding, reserved root"); - return true; - } - - { - use cargo::core::TargetKind as Tk; - if executable && !matches!(tk, Tk::Bin | Tk::ExampleBin) { - log::trace!(" excluding, is not executable"); - return true; - } - } - - let target = targets_cache.entry(*root) - .or_insert_with(|| target_for_root(root)); - - let ct = determine_crate_types(cfg, art, target, tk.clone(), ck).collect::>(); - - let is_good = - art.filenames.len() == ct.len() && !ct.iter().any(|(_, ct)| ct.is_none()); - if is_good { - // save resolved crate-types: - let ct = ct.into_iter() - .filter_map(|(p, ct)| ct.map(|ct| (p.to_owned(), ct))); - crate_types_cache.extend(ct); - } - - need_remove_roots && !is_good - }) - .inspect(|r| { - let p = r.package_id().name(); - let t = r.node().target().name.as_str(); - log::trace!(" excluded: {p}::{t} {:?}", match r.node().unit().platform { - CompileKind::Host => "host", - CompileKind::Target(ref kind) => kind.short_name(), - }) - }) - .count(); + let removed = roots.extract_if(|root| { + let tk = root.node().target().kind(); + let ck = root.node().unit().platform; + + log::trace!(" check {} {}", tk.description(), match ck { + CompileKind::Host => "host", + CompileKind::Target(ref kind) => kind.short_name(), + }); + + if reserved_roots.contains(root) { + log::trace!(" excluding, reserved root"); + return true; + } + + { + use cargo::core::TargetKind as Tk; + if executable && !matches!(tk, Tk::Bin | Tk::ExampleBin) { + log::trace!(" excluding, is not executable"); + return true; + } + } + + let target = targets_cache.entry(*root) + .or_insert_with(|| target_for_root(root)); + + let ct = + determine_crate_types(cfg, art, target, tk.clone(), ck).collect::>(); + + let is_good = + art.filenames.len() == ct.len() && !ct.iter().any(|(_, ct)| ct.is_none()); + if is_good { + // save resolved crate-types: + let ct = ct.into_iter() + .filter_map(|(p, ct)| ct.map(|ct| (p.to_owned(), ct))); + crate_types_cache.extend(ct); + } + + need_remove_roots && !is_good + }) + .inspect(|r| { + let p = r.package_id().name(); + let t = r.node().target().name.as_str(); + log::trace!(" excluded: {p}::{t} {:?}", match r.node().unit().platform { + CompileKind::Host => "host", + CompileKind::Target(ref kind) => kind.short_name(), + }) + }) + .count(); if removed > 0 { log::trace!(" excluded: {removed}, now roots: {}", roots.len());