Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata & manifest-builder refactoring #366

Merged
merged 25 commits into from
Jun 4, 2024
Merged

Conversation

boozook
Copy link
Owner

@boozook boozook commented May 28, 2024


⚠️ Breaking changes:

  • [package.metadata.playdate.assets.options] not supported from now, use playdate.options.assets

@github-actions github-actions bot added docs Improvements or additions to documentation cargo About cargo or cargo-playdate labels May 28, 2024
@boozook boozook added assets Assets Build System build-utils manifest Package manifest -related things labels May 28, 2024
cargo/src/build/mod.rs Outdated Show resolved Hide resolved
support/build/src/metadata/format.rs Outdated Show resolved Hide resolved
support/build/src/metadata/format.rs Outdated Show resolved Hide resolved
support/build/src/metadata/format.rs Outdated Show resolved Hide resolved
support/build/src/metadata/format.rs Outdated Show resolved Hide resolved
support/build/src/metadata/source.rs Outdated Show resolved Hide resolved
support/build/src/metadata/source.rs Outdated Show resolved Hide resolved
support/build/src/metadata/source.rs Outdated Show resolved Hide resolved
support/build/src/metadata/source.rs Outdated Show resolved Hide resolved
support/build/src/metadata/source.rs Outdated Show resolved Hide resolved
boozook and others added 2 commits May 29, 2024 01:53
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
support/build/src/metadata/source.rs Outdated Show resolved Hide resolved
support/build/src/metadata/source.rs Outdated Show resolved Hide resolved
@paulstraw
Copy link

@boozook sorry for another noobish question/issue, I'd appreciate a nudge in the right direction. I tried updating my project's dependencies to point at playdate = { git = "https://github.com/boozook/playdate.git", branch = "dev/meta-assets" }, as well as manually updating playdate-tool and playdate-bindgen:

cargo install --git https://github.com/boozook/playdate.git --branch dev/meta-assets playdate-tool
cargo install --git https://github.com/boozook/playdate.git --branch dev/meta-assets playdate-bindgen
However, I still seem to be missing some part of the update, as builds give the enclosed error.
» cargo playdate run --example 01_text_2d
    Updating git repository `https://github.com/boozook/playdate.git`
   Compiling proc-macro2 v1.0.82
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.154
   Compiling glob v0.3.1
   Compiling utf8parse v0.2.1
   Compiling cfg-if v1.0.0
   Compiling is_terminal_polyfill v1.70.0
   Compiling anstyle v1.0.7
   Compiling colorchoice v1.0.1
   Compiling anstyle-query v1.0.3
   Compiling anstyle-parse v0.2.4
   Compiling memchr v2.7.2
   Compiling option-ext v0.2.0
   Compiling clap_lex v0.7.0
   Compiling heck v0.5.0
   Compiling regex-syntax v0.8.3
   Compiling strsim v0.11.1
   Compiling anstream v0.6.14
   Compiling minimal-lexical v0.2.1
   Compiling libloading v0.8.3
   Compiling bindgen v0.69.4
   Compiling clang-sys v1.7.0
   Compiling clap_builder v4.5.2
   Compiling either v1.11.0
   Compiling nom v7.1.3
   Compiling semver v1.0.23
   Compiling lazycell v1.3.0
   Compiling itertools v0.12.1
   Compiling shlex v1.3.0
   Compiling bitflags v2.5.0
   Compiling lazy_static v1.4.0
   Compiling rustc-hash v1.1.0
   Compiling arrayvec v0.7.4
   Compiling quote v1.0.36
   Compiling dirs-sys v0.4.1
   Compiling syn v2.0.63
   Compiling dirs v5.0.1
   Compiling autocfg v1.3.0
   Compiling regex-automata v0.4.6
   Compiling playdate-build-utils v0.3.2 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling libm v0.2.8
   Compiling num-traits v0.2.19
   Compiling az v1.2.1
   Compiling version_check v0.9.4
   Compiling serde v1.0.201
   Compiling cexpr v0.6.0
   Compiling ahash v0.8.11
   Compiling byteorder v1.5.0
   Compiling regex v1.10.4
   Compiling serde_json v1.0.117
   Compiling micromath v2.1.0
   Compiling zerocopy v0.7.34
   Compiling once_cell v1.19.0
   Compiling float-cmp v0.9.0
   Compiling anyhow v1.0.83
   Compiling erased_set v0.8.0
   Compiling embedded-graphics-core v0.4.0
   Compiling spin v0.5.2
   Compiling cty v0.1.5
   Compiling itoa v1.0.11
   Compiling ryu v1.0.18
   Compiling allocator-api2 v0.2.18
   Compiling cstr_core v0.1.2
   Compiling euclid v0.22.9
   Compiling embedded-graphics v0.8.1
   Compiling hashbrown v0.14.5
   Compiling clap_derive v4.5.4
   Compiling serde_derive v1.0.201
   Compiling tinybmp v0.5.0
   Compiling clap v4.5.4
   Compiling playdate-bindgen-cfg v0.1.6 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling playdate-bindgen v0.1.10 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling playdate-sys v0.4.0 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling playdate-fs v0.2.7 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling playdate-color v0.2.3 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling playdate-system v0.3.11 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling playdate-display v0.3.5 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling playdate-scoreboards v0.1.1 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling playdate-lua v0.1.0 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling playdate-menu v0.2.3 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling playdate-controls v0.3.4 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling playdate-graphics v0.4.0 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling playdate-sound v0.4.0 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling playdate-sprite v0.2.10 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling playdate v0.2.0 (https://github.com/boozook/playdate.git?branch=dev/meta-assets#f23f07bb)
   Compiling pd3d v0.1.0 (/Users/paulstraw/dev/pd3d)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.59s
        Skip drop pd3d, crate 01_text_2d, can't build staticlib targeting simulator
   Compiling dylib of pd3d v0.1.0 (/Users/paulstraw/dev/pd3d)
    Finished dylib of pd3d
        Skip drop pd3d, crate 01_text_2d, can't build rlib targeting simulator
   Packaging (single-target) pd3d:01_text_2d (source: dylib, target: dylib)
error: [package.metadata.playdate] not found in the manifest file Cargo.toml

@boozook
Copy link
Owner Author

boozook commented May 30, 2024

@paulstraw,

I tried updating my project's dependencies to point at playdate = { git = "https://github.com/boozook/playdate.git", branch = "dev/meta-assets" }, as well as manually updating playdate-tool and playdate-bindgen

That's not needed. Here is just not-ready (but seems nothing is broken) version of cargo-playdate cargo plugin in this PR. I'm still working on this.
So you're only interested in the cargo-playdate tool in this brunch.

I recommend use API-crates such as playdate, playdate-sys, playdate-sound,.. from the crates.io.


error: [package.metadata.playdate] not found in the manifest file Cargo.toml

Hmmmm, and now I'm not sure that nothing is broken 🤔
Thanks, I'll try to reproduce.

@boozook boozook force-pushed the dev/meta-assets branch from f23f07b to a2227e3 Compare May 30, 2024 08:38
cargo/src/package/mod.rs Outdated Show resolved Hide resolved
cargo/src/package/mod.rs Outdated Show resolved Hide resolved
boozook and others added 2 commits May 30, 2024 12:56
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
cargo/src/assets/plan.rs Outdated Show resolved Hide resolved
@boozook
Copy link
Owner Author

boozook commented May 30, 2024

@paulstraw I don't think that's possible 🤯.

However, I still seem to be missing some part of the update, as builds give the enclosed error.

   Packaging (single-target) pd3d:01_text_2d (source: dylib, target: dylib)
   error: [package.metadata.playdate] not found in the manifest file Cargo.toml

Are you sure that using this version of cargo-playdate?

I'm absolutely sure in it because I've deleted (here) that error in this pre1 version.

Screenshot 2024-05-30 at 17 44 09

@boozook
Copy link
Owner Author

boozook commented May 30, 2024

But anyway I found that asset-dependencies are not works properly (#372).

@boozook
Copy link
Owner Author

boozook commented May 30, 2024

@paulstraw
Oh, seems I'v got it. May be you used one of previous commits where it still was. Fixed now.

@paulstraw
Copy link

paulstraw commented May 31, 2024

Thanks for clarifying. After a cargo install --git https://github.com/boozook/playdate.git --branch dev/meta-assets cargo-playdate locally, this is working for me as expected. I tried both the [package.metadata.playdate.example.my_example] and [[package.metadata.playdate.example]] + target versions, and got the expected results both ways.

@boozook
Copy link
Owner Author

boozook commented May 31, 2024

Good, thank you.
Also I suppose there could be [package.metadata.playdate.assets.options]? That is a breaking change, from now please use options.assets instead of assets.options.

@boozook
Copy link
Owner Author

boozook commented Jun 2, 2024

6008903 is to fix KyleMayes/clang-sys#181

cargo/src/utils/cargo/meta_deps.rs Outdated Show resolved Hide resolved
cargo/src/utils/cargo/meta_deps.rs Outdated Show resolved Hide resolved
cargo/src/utils/cargo/meta_deps.rs Outdated Show resolved Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
cargo/src/utils/cargo/meta_deps.rs Outdated Show resolved Hide resolved
cargo/src/utils/cargo/meta_deps.rs Outdated Show resolved Hide resolved
cargo/src/utils/cargo/meta_deps.rs Outdated Show resolved Hide resolved
@boozook boozook marked this pull request as ready for review June 4, 2024 16:11
@github-actions github-actions bot enabled auto-merge (squash) June 4, 2024 16:11
@github-actions github-actions bot merged commit 88781e2 into main Jun 4, 2024
40 checks passed
@boozook boozook deleted the dev/meta-assets branch June 4, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assets Assets Build System build-utils cargo About cargo or cargo-playdate docs Improvements or additions to documentation manifest Package manifest -related things
Projects
Status: Done
2 participants