Skip to content

Conversation

@mootz12
Copy link
Contributor

@mootz12 mootz12 commented Jan 27, 2026

What

Update checks for Cargo during stellar contract build to throw errors instead of warnings.

Why

Prevent the CLI from being used to build contracts without overflow-checks = true

Known limitations

None

@mootz12 mootz12 requested a review from a team as a code owner January 27, 2026 21:35
Copilot AI review requested due to automatic review settings January 27, 2026 21:35
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Jan 27, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR converts overflow-checks validation from warnings to errors during stellar contract build, preventing contracts from being built without overflow-checks = true in their Cargo.toml configuration.

Changes:

  • Modified run_checks() and check_overflow_checks() functions to return errors instead of emitting warnings
  • Added new CargoConfiguration error variant for Cargo.toml validation failures
  • Updated all tests to expect errors instead of warnings and verify proper failure/success behavior
  • Added overflow-checks = true to the root Cargo.toml's release profile
  • Fixed spelling: "retreiving" → "retrieving"

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
cmd/soroban-cli/src/commands/contract/build.rs Converted overflow-checks validation from warnings to errors; added CargoConfiguration error type; fixed spelling typo
cmd/crates/soroban-test/tests/it/build.rs Updated test names and assertions to expect errors instead of warnings; adjusted fixture paths to copy entire workspace; added new test cases for various overflow-checks scenarios
Cargo.toml Added overflow-checks = true to release profile to ensure the CLI itself is built with overflow checks enabled

@mootz12 mootz12 merged commit 4b45b4e into main Jan 28, 2026
29 of 30 checks passed
@mootz12 mootz12 deleted the error-without-overflow-checks branch January 28, 2026 15:10
@github-project-automation github-project-automation bot moved this from Backlog (Not Ready) to Done in DevX Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants