-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation error while running near-client test on nightly #4351
Comments
Made it work with the following hack: diff --git a/chain/client/Cargo.toml b/chain/client/Cargo.toml
index 8ba87da56..5ab171a0c 100644
--- a/chain/client/Cargo.toml
+++ b/chain/client/Cargo.toml
@@ -55,10 +55,10 @@ expensive_tests = []
adversarial = ["near-network/adversarial", "near-chain/adversarial"]
metric_recorder = ["near-client-primitives/metric_recorder"]
delay_detector = ["near-chain/delay_detector", "near-network/delay_detector", "delay-detector"]
-protocol_feature_block_header_v3 = ["near-primitives/protocol_feature_block_header_v3", "near-chain/protocol_feature_block_header_v3", "near-store/protocol_feature_block_header_v3"]
+protocol_feature_block_header_v3 = ["near-primitives/protocol_feature_block_header_v3", "near-chain/protocol_feature_block_header_v3", "near-store/protocol_feature_block_header_v3", "nearcore/protocol_feature_block_header_v3"]
protocol_feature_add_account_versions = ["near-primitives/protocol_feature_add_account_versions"]
protocol_feature_fix_storage_usage = ["near-primitives/protocol_feature_fix_storage_usage"]
protocol_feature_restore_receipts_after_fix = []
protocol_feature_cap_max_gas_price = ["near-primitives/protocol_feature_cap_max_gas_price"]
nightly_protocol = []
-nightly_protocol_features = ["nightly_protocol", "near-chain/nightly_protocol_features", "protocol_feature_block_header_v3", "protocol_feature_add_account_versions", "protocol_feature_fix_storage_usage", "protocol_feature_restore_receipts_after_fix", "protocol_feature_cap_max_gas_price"]
+nightly_protocol_features = ["nightly_protocol", "near-chain/nightly_protocol_features", "protocol_feature_block_header_v3", "protocol_feature_add_account_versions", "protocol_feature_fix_storage_usage", "protocol_feature_restore_receipts_after_fix", "protocol_feature_cap_max_gas_price", "nearcore/protocol_feature_fix_storage_usage", "nearcore/protocol_feature_restore_receipts_after_fix"] The reason why it does not work is that
nearcore/core/primitives/src/epoch_manager.rs Line 280 in 7c1080c
protocol_feature_block_header_v3 in nearcore , which means that block_info in test_utils is
BlockInfo as a struct instead of an enum and that leads to the compilation error.
@matklad do you see a better way to fix this? |
The cargo.toml patch by @bowenwang1996 I think is a good solution. The root cause here is the combination of features, and the fact that we have circular dependencies. nearcore depends on near-client, but near-client depends on nearcore for testing. I feel that such cycles create a fair bit of complexity. Let me create a dedicated issue to tackle that! EDIT: #4357 |
@Longarithm does my patch work for you? |
@bowenwang1996 |
Okay then let's close this issue in favor of #4357 |
Restore #4360. Previous version was reverted: #4363 The difference is that I don't add features needed for testing `near-client` described here: #4351 (comment)
The following command fails on master since #4292:
Also, if we set exact protocol feature, the test is compiled but not passed:
cc: @bowenwang1996
The text was updated successfully, but these errors were encountered: