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

fix: artifacts naming issues #1038

Closed
wants to merge 3 commits into from
Closed

Conversation

notV4l
Copy link
Collaborator

@notV4l notV4l commented Oct 13, 2023

Copy link
Member

@kariy kariy Oct 13, 2023

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 98 to 114
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,
};
Copy link
Member

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 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe


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 {
Copy link
Member

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.

Copy link
Contributor

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

@kariy
Copy link
Member

kariy commented Oct 26, 2023

i think there'll be an issue in the mapping here as well

let mut compiled_classes: HashMap<SmolStr, (FieldElement, Option<abi::Contract>)> =

similar contracts name would simply overwrite each other

@ponderingdemocritus
Copy link
Contributor

this still alive?

@tarrencev tarrencev force-pushed the main branch 9 times, most recently from dd36cf5 to 4979471 Compare December 1, 2023 08:56
@tarrencev tarrencev force-pushed the main branch 3 times, most recently from 87475da to 112cce7 Compare December 4, 2023 03:03
@notV4l notV4l closed this Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[sozo] Systems name & artifact naming [sozo] naming conflicts between Components & Systems
4 participants