Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(cli): Correct handling of compilation skipping in trace decoder #10254

Closed
wants to merge 6 commits into from

Conversation

GarmashAlex
Copy link

@GarmashAlex GarmashAlex commented Apr 5, 2025

Motivation

This commit fixes an issue in the handle_traces function where it wasn't properly handling the case when project compilation is skipped due to no file changes.

Previously, when the trace decoder encountered "No files changed, compilation skipped" message, the test decode_traces_with_project_artifacts failed due to mismatch between expected and actual output.

Solution

The fix:

  1. Updated handle_traces function in crates/cli/src/utils/cmd.rs to correctly handle the case when compilation is skipped
  2. Added proper comments explaining the behavior
  3. Updated test expectations to match the actual output

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@GarmashAlex GarmashAlex changed the title Hpp37 fix(cli): Correct handling of compilation skipping in trace decoder Apr 5, 2025
@GarmashAlex
Copy link
Author

some nits :)

@@ -2003,7 +2003,16 @@ contract LocalProjectScript is Script {
.stdout_eq(str![[r#"
Executing previous transactions from the block.
Compiling project to generate artifacts
Nothing to compile
Copy link
Collaborator

@grandizzy grandizzy Apr 7, 2025

Choose a reason for hiding this comment

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

Hm, can you share in what conditions do you hit this? The cast call is be done from outside of the project hence Nothing to compile should be the right output (don't see any failures locally or in CI). thanks!

@GarmashAlex GarmashAlex closed this Apr 7, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants