-
Notifications
You must be signed in to change notification settings - Fork 184
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
fix: artifacts naming issues #1038
Conversation
notV4l
commented
Oct 13, 2023
- fix [sozo] naming conflicts between Components & Systems #930
- fix [sozo] Systems name & artifact naming #931
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mind extending the test_compiler
test in this file to check that the generated artifacts have the expected naming format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
crates/dojo-lang/src/compiler.rs
Outdated
let is_model = match class.abi.clone() { | ||
Some(abii) => abii.items.iter().any(|i| match i { | ||
abi::Item::Struct(s) => s.name == "dojo::database::schema::Struct", | ||
_ => false, | ||
}), | ||
None => false, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a reliable way to check for model/contract ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i believe
0f4d258
to
19d76ce
Compare
38f06e6
to
1ed3903
Compare
1ed3903
to
84cc19c
Compare
|
||
let mut file = target_dir.open_rw(file_name.clone(), "output file", ws.config())?; | ||
let is_model = match &class.abi { | ||
Some(abi) => abi.items.iter().any(|i| match i { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recent update to Cairo 2.3.0 seems to have made items
private which invalidates this approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a solution here: starkware-libs/cairo#4310
i think there'll be an issue in the mapping here as well dojo/crates/dojo-lang/src/compiler.rs Line 99 in 1018840
similar contracts name would simply overwrite each other |
this still alive? |
dd36cf5
to
4979471
Compare
87475da
to
112cce7
Compare