boozook / playdate

Playdate Build Tools and API
https://mastodon.gamedev.place/@pd
MIT License
133 stars 8 forks source link

Metadata & manifest-builder refactoring #366

Closed boozook closed 3 months ago

boozook commented 3 months ago

⚠️ Breaking changes:

paulstraw commented 3 months ago

@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 commented 3 months ago

@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 commented 3 months ago

@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 commented 3 months ago

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

boozook commented 3 months ago

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

paulstraw commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

https://github.com/boozook/playdate/pull/366/commits/6008903320b792e8b19eceaacaa1478fd4b01298 is to fix https://github.com/KyleMayes/clang-sys/issues/181