Skip to content

Commit

Permalink
Merge pull request #21 from OffchainLabs/simpler-message
Browse files Browse the repository at this point in the history
Simpler Message On Retrying Compilation With Nightly
  • Loading branch information
rauljordan authored Jan 31, 2024
2 parents 8eccc53 + 289735c commit a83ab3f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ pub enum BuildError {
#[error("could not find WASM in release dir ({path}).")]
NoWasmFound { path: PathBuf },
#[error(
r#"compressed program size ({got}) exceeds max ({want}) despite --nightly flag. We recommend splitting up your program.
We are actively working to reduce WASM program sizes that use the Stylus SDK.
To see all available optimization options, see more in:
https://github.com/OffchainLabs/cargo-stylus/blob/main/OPTIMIZING_BINARIES.md"#
r#"compressed program size ({got}) exceeds max ({want}) despite --nightly flag. We recommend splitting up your program."#
)]
ExceedsMaxDespiteBestEffort { got: ByteSize, want: ByteSize },
#[error(
Expand Down Expand Up @@ -135,10 +132,7 @@ https://github.com/OffchainLabs/cargo-stylus/blob/main/OPTIMIZING_BINARIES.md"#,
OptLevel::Z => {
if !cfg.nightly {
println!(
r#"Compressed program still exceeding max program size {} > max of 24Kb,
rebuilding with optimizations. We are actively working to reduce WASM program sizes that are
using the Stylus SDK. To see all available optimization options, see more in:
https://github.com/OffchainLabs/cargo-stylus/blob/main/OPTIMIZING_BINARIES.md"#,
r#"Program still exceeds max program size {} > max of 24Kb"#,
got.red(),
);
// Attempt to build again with the nightly flag enabled and extra optimizations
Expand Down

0 comments on commit a83ab3f

Please sign in to comment.