Skip to content

Fix packages rebuild every time#589

Merged
mssun merged 3 commits intoapache:masterfrom
mssun:fix-rebuild
Dec 14, 2021
Merged

Fix packages rebuild every time#589
mssun merged 3 commits intoapache:masterfrom
mssun:fix-rebuild

Conversation

@mssun
Copy link
Member

@mssun mssun commented Dec 14, 2021

Description

This PR fix building issue.

According to rust-lang/cargo#2904, I enabled cargo log with CARGO_LOG=cargo::core::compiler::fingerprint=trace and see this log:

[2021-12-14T02:19:39Z INFO  cargo::core::compiler::fingerprint]     err: RUSTFLAGS has changed: ["--cfg", "test_mode", "--cfg", "sgx_sim", "--cfg", "executor_builtin", "--cfg", "executor_mesapy", "--cfg", "executor_wamr", "--cfg", "test_mode"] != ["--cfg", "test_mode", "--cfg", "sgx_sim", "--cfg", "executor_builtin", "--cfg", "executor_mesapy", "--cfg", "executor_wamr"]

I realize that this additional test_mode flag affect the rebuild. However, when building with TEST_MODE=ON, the test_mode flag has been added to all services. Therefore, we can safely delete this.

Type of change (select or add applied and delete the others)

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

CI.

Checklist

  • Fork the repo and create your branch from master.
  • If you've added code that should be tested, add tests.
  • If you've changed APIs, update the documentation.
  • Ensure the tests pass (see CI results).
  • Make sure your code lints/format.

@mssun mssun changed the title Fix rebuild packages every time Fix packages rebuild every time Dec 14, 2021
qinkunbao
qinkunbao previously approved these changes Dec 14, 2021
Copy link
Member

@qinkunbao qinkunbao left a comment

Choose a reason for hiding this comment

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

Thank you for this PR. When compiling in incremental mode, Teaclave compiled some unnecessary crates and libraries. This PR fixes the bug in the dependency and decreases the building time significantly.

Copy link
Contributor

@AI-Memory AI-Memory left a comment

Choose a reason for hiding this comment

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

+1, thanks.

@mssun mssun merged commit e919563 into apache:master Dec 14, 2021
@mssun mssun deleted the fix-rebuild branch December 14, 2021 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants