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

[BUG] bindings generation command crashes due to "not found in filtered tokens" #2780

Open
alexhaloETH opened this issue Dec 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@alexhaloETH
Copy link

When running the command sozo build --unity the build process runs fine but the creation of the bindings for the unity game engine seem to error out

Although not 100% sure, I believe to reproduce this bug you would need a model with a generic type, in our case I believe TStats model can either be a i8 or u8 Link to our repo and where i think the issue generates from

The bindings should generate full without any errors

Proof
alexhalo@Legion:~/Work-Repos/blob-arena-contracts$ sozo build --unity Updating git repository https://github.com/dojoengine/dojo Compiling blob_arena v0.7.1 (/home/alexhalo/Work-Repos/blob-arena-contracts/Scarb.toml) Finished dev profile target(s) in 13 seconds thread 'main' panicked at /home/runner/.cargo/git/checkouts/cainome-971a2d0b3a80c185/5c2616c/crates/parser/src/tokens/mod.rs:161:25: Composite blob_arena::stats::TStats::<core::integer::u8> not found in filtered tokens note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

This error was was reproduced in 1.0.1 1.0.4 1.0.5 version of dojo
PS: the v0.7.1 in the naming you can ignore the project is based on dojo version 1.0.1

@alexhaloETH alexhaloETH added the bug Something isn't working label Dec 6, 2024
@alexhaloETH alexhaloETH changed the title [BUG] --unity command crashes due to "not found in filtered tokens" [BUG] bindings generation command crashes due to "not found in filtered tokens" Dec 20, 2024
@alexhaloETH
Copy link
Author

alexhaloETH commented Dec 20, 2024

As an update, I changed the name as I have noticed this happens also for the typescript

Also I have tried 1.0.8 version and the problem still persists

-- Edit, this is the specific way to replicate this error
#[derive(Copy, Drop, Serde, PartialEq, IntrospectPacked, Default)]
struct TStats {
strength: T,
vitality: T,
dexterity: T,
luck: T,
}
type UStats = TStats;

#[dojo::model]
#[derive(Drop, Serde, Copy)]
struct BlobertItem {
#[key]
key: felt252,
stats: UStats,
}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant