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

Fix feature-related compilation issues. #447

Merged
merged 1 commit into from
Mar 24, 2021
Merged

Fix feature-related compilation issues. #447

merged 1 commit into from
Mar 24, 2021

Conversation

Dirbaio
Copy link
Member

@Dirbaio Dirbaio commented Mar 23, 2021

The goal is that every combination of features either:

  • compiles cleanly, or
  • fails to compile with a human-readable error message

I've opted to make "no ipv4 and no ipv6" an unsupported combination. It could be made to work but I don't think it's worth it.

Fixed cases:

  • (no features) -> now fails with You must enable at least one of the following features: proto-ipv4, proto-ipv6. Fixes 0.7 build error #428 (comment)
  • proto-ipv4,socket -> now fails with If you enable the socket feature, you must enable at least one of the following features: socket-raw, socket-udp, socket-tcp, socket-icmp. Fixes 0.7 build error #428 (comment)
  • ethernet -> now correctly enables socket feature, and then fails with the error above.
  • proto-dhcpv4 -> now correctly enables ethernet feature.
  • proto-ipv4,phy-tap_interface -> now correctly enables ethernet feature.

fixes #428

Will be cherry-picked for 0.7.1 release

@Dirbaio Dirbaio requested a review from whitequark March 23, 2021 23:57
@Dirbaio Dirbaio force-pushed the fix-bad-features branch 4 times, most recently from 28c19ef to defd81c Compare March 24, 2021 01:28
@Dirbaio Dirbaio merged commit cb54c60 into master Mar 24, 2021
@Dirbaio Dirbaio deleted the fix-bad-features branch March 24, 2021 02:12
@Dirbaio Dirbaio mentioned this pull request Mar 24, 2021
@whitequark
Copy link
Contributor

I've opted to make "no ipv4 and no ipv6" an unsupported combination. It could be made to work but I don't think it's worth it.

I think this is a reasonable decision. That's what I aimed to do anyway, but I think at the time compile_error! was not a thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

0.7 build error
3 participants