Skip to content
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

networks: Show an informative error message if the selected feature set is invalid. #1373

Merged
merged 4 commits into from
Jan 14, 2022

Conversation

lemmih
Copy link
Contributor

@lemmih lemmih commented Jan 13, 2022

Summary of changes
Changes introduced in this pull request:

  • In the networks crate, emit an informative error message if none of the required feature flags are selected.

Reference issue to close (if applicable)

Closes nothing.

Other information and links

This improves the error message if one tries to build networks without any feature flags set.

@@ -19,7 +28,6 @@ pub use self::mainnet::*;
mod mainnet;
#[cfg(feature = "conformace")]
pub use self::mainnet::*;
pub use crate::mainnet::*;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this might be breaking the test vectors: https://github.com/ChainSafe/forest/runs/4806953786?check_suite_focus=true

@lemmih
Copy link
Contributor Author

lemmih commented Jan 13, 2022

Yeah, the situation was a bit more complicated then I thought.

Old behavior:
Using mainnet and conformance at the same time broke the build with no intelligible error message. Using mainnet and devnet at the same time would silently ignore devnet.

New behavior: One and only one network must be specified. If this isn't the case then an error will be raised.

@noot noot merged commit 5a85338 into main Jan 14, 2022
@noot noot deleted the lemmih/networks-error-msg branch January 14, 2022 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants