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

chore(runnable_task): remove async_trait usage #2660

Merged
merged 3 commits into from
Feb 4, 2025

Conversation

rymnc
Copy link
Member

@rymnc rymnc commented Feb 3, 2025

Linked Issues/PRs

  • none

Description

should improve performance. breaking changes for anyone using fuel-core as a dependency, more specifically the RunnableTask trait. maybe cc: @FuelLabs/data-systems ?

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • I have reviewed the code myself
  • I have created follow-up issues caused by this PR and linked them here

After merging, notify other teams

[Add or remove entries as needed]

@rymnc rymnc added the no changelog Skip the CI check of the changelog modification label Feb 3, 2025
@rymnc rymnc self-assigned this Feb 3, 2025
@rymnc rymnc added the breaking A breaking api change label Feb 3, 2025
@rymnc rymnc marked this pull request as ready for review February 3, 2025 10:04
netrome
netrome previously approved these changes Feb 3, 2025
Copy link
Contributor

@netrome netrome left a comment

Choose a reason for hiding this comment

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

Niiice!

AurelienFT
AurelienFT previously approved these changes Feb 3, 2025
@rymnc rymnc enabled auto-merge (squash) February 3, 2025 12:18
Copy link
Collaborator

@xgreenx xgreenx left a comment

Choose a reason for hiding this comment

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

Very cool that we can avoid usage of the async_trait. Do we still need this dependency?

@@ -878,6 +877,7 @@ where
B: Broadcast + 'static,
T: TxPool + 'static,
{
#[allow(clippy::arithmetic_side_effects)]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need it?

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess clippy was ok when the future was boxed, but it started throwing this error when I removed it.

we still need the dependency because Runnable service uses it, I was thinking to remove in a follow up pr

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we can resolve it in this PR? Or is it too many changes?

Copy link
Member Author

Choose a reason for hiding this comment

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

addressed in ff12199

Copy link
Member Author

Choose a reason for hiding this comment

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

i wonder why it was not caught previously? wouldn't a boxed future also still have the same property that overflow is possible? weird

@rymnc rymnc dismissed stale reviews from AurelienFT and netrome via ff12199 February 4, 2025 04:01
@netrome
Copy link
Contributor

netrome commented Feb 4, 2025

Very cool that we can avoid usage of the async_trait. Do we still need this dependency?

I think we still need it for implementing third-party traits in some places. But it would be great to get rid of it.

@rymnc
Copy link
Member Author

rymnc commented Feb 4, 2025

Very cool that we can avoid usage of the async_trait. Do we still need this dependency?

I think we still need it for implementing third-party traits in some places. But it would be great to get rid of it.

still need for async_graphql, i tangled with it yesterday and did not have fun with it at all.

@rymnc rymnc merged commit 6665bc4 into master Feb 4, 2025
33 checks passed
@rymnc rymnc deleted the remove-async-trait-from-runnable-task branch February 4, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A breaking api change no changelog Skip the CI check of the changelog modification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants