Concordium / concordium-wasm-smart-contracts

Core support for Wasm smart contracts on the Concordium blockchain.
Other
7 stars 2 forks source link

cargo-concordium: Double printing of warning messages during build with schema embedded #48

Closed rimbi closed 2 years ago

rimbi commented 2 years ago

Description

When the --schema-embed parameter is used with cargo concordium build if there are warnings in the contract they are printed twice.

Steps to Reproduce

Expected Result

Actual Result

Versions

abizjak commented 2 years ago

Yes. This is because the contract has to be built in two ways, first as a normal contract, and then second time to emit the schema.

The only option we'd have is to suppress output from the second build. However this is problematic in the cases where there are issues. Suppressing input unless the build succeeds could be on option, but needs some analysis to make sure that warnings don't sometimes contain critical information.

rimbi commented 2 years ago

Suppressing only the output from the second cargo build seems to be a viable solution.

abizjak commented 2 years ago

Since we are not confident that this will not sometimes hide important warnings, the benefit of doing this does not outweigh the risks.

So I am closing this issue.