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

Update feature gates #1

Merged
merged 1 commit into from
Jul 13, 2023
Merged

Conversation

ankurdubey521
Copy link
Contributor

The original code was not building for me locally, with the following compiler errors:

error[E0635]: unknown feature `hash_drain_filter`
 --> src/lib.rs:5:12
  |
5 | #![feature(hash_drain_filter)]
  |            ^^^^^^^^^^^^^^^^^

error[E0635]: unknown feature `option_result_contains`
 --> src/lib.rs:4:12
  |
4 | #![feature(option_result_contains)]
  |            ^^^^^^^^^^^^^^^^^^^^^^

error[E0635]: unknown feature `drain_filter`
 --> src/lib.rs:3:12
  |
3 | #![feature(drain_filter)]
  |            ^^^^^^^^^^^^

  1. Based on this and this, drain_filter has been renamed to extract_if and hash_drain_filter to hash_extract_if. Therefore I've substituted the drain_filter calls with equivalent extract_if calls.
  2. Based on this, the option_result_contains has been removed, as far as I can see there are no substitues. The code builds without this gate so I've removed it, but I'm not completely sure if that's the correct thing to do.

@ankurdubey521 ankurdubey521 changed the title Update feature gates to new ones Update feature gates Jul 12, 2023
Copy link
Owner

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

Great, thanks!

I think we should try to port the code away from the nightly compiler altogether. To use it in Lighthouse we need to be able to compile it with the stable compiler.

Updating all of the code might not be necessary, as we only need the Bron Kerbosch algorithm for the aggregation feature. We could port BK to a crate inside Lighthouse, which we can then tweak to further fit our needs. I suspect there'll be a few other changes required to the structure of the algorithm to make it work efficiently with our data types.

@michaelsproul michaelsproul merged commit c79cae9 into michaelsproul:main Jul 13, 2023
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.

2 participants