We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Cairo version:
2.5.0 (was fine in 2.2.0)
Current behavior:
Contract that includes implementation annotated with #[cfg(test)] doesn't compile. Works fine when running scarb test
#[cfg(test)]
scarb test
Related code:
Code example:
#[cfg(test)] #[starknet::interface] trait ITests<TContractState> { fn set_value(ref self: TContractState, value: felt252); } #[starknet::contract] mod MyContract { #[storage] struct Storage { value: felt252 } #[cfg(test)] #[abi(embed_v0)] impl TestsImpl of super::ITests<ContractState> { fn set_value(ref self: ContractState, value: felt252) { self.value.write(value); } } }
scarb build output:
scarb build
error: Plugin diagnostic: Identifier not found. --> ...cairo:121:10 impl TestsImpl of super::ITests<ContractState> { ^*******^ error: Identifier not found. --> ...cairo[contract]:24:20 use super::TestsImpl; ^*******^
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Bug Report
Cairo version:
2.5.0 (was fine in 2.2.0)
Current behavior:
Contract that includes implementation annotated with
#[cfg(test)]
doesn't compile.Works fine when running
scarb test
Related code:
Code example:
scarb build
output:The text was updated successfully, but these errors were encountered: