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

Depending on Penumbra requires building with tokio-unstable #3856

Closed
plaidfinch opened this issue Feb 20, 2024 · 3 comments
Closed

Depending on Penumbra requires building with tokio-unstable #3856

plaidfinch opened this issue Feb 20, 2024 · 3 comments
Labels
C-bug Category: a bug C-enhancement Category: an enhancement to the codebase E-day E-easy Effort: Easy

Comments

@plaidfinch
Copy link
Collaborator

Experience report depending on penumbra libraries (-proto and -governance) externally to the mono-repo: in order to avoid build errors related to use of tokio::task::Builder in cnidarium (and possibly elsewhere?) I have to create a .cargo/config.toml with:

[build]
rustflags = ["--cfg", "tokio_unstable"]

Ideally I wouldn't have to do this, and the use of the task builder interface would be feature-gated so that I just lose out on the ability to get good task introspection in tokio-console if I don't do this, rather than getting a build-time failure in a dependency.

@plaidfinch plaidfinch added C-bug Category: a bug C-enhancement Category: an enhancement to the codebase E-easy Effort: Easy E-day labels Feb 20, 2024
@github-project-automation github-project-automation bot moved this to 🗄️ Backlog in Penumbra Feb 20, 2024
@conorsch
Copy link
Contributor

conorsch commented Apr 8, 2024

Ideally I wouldn't have to do this, and the use of the task builder interface would be feature-gated

Word. Unfortunately, that's not an option for us, because the builder interface uses unstable APIs, and the use of unstable APIs in tokio mandates use of rustflags:

To enable these features, the --cfg tokio_unstable argument must be passed to rustc when compiling. This serves to explicitly opt-in to features which may break semver conventions, since Cargo does not yet directly support such opt-ins

All this isn't worth the trouble. What we get for using the Builder interface is nicely "named" tasks, which would allow the tokio console output to be a lot more meaningful during debugging. Given the downstream friction this creates, it's not worthwhile, so let's just move away from the Builder interface entirely, reconsidering it if and when it stabilizes.

There's a bit of context in discord.

@conorsch
Copy link
Contributor

conorsch commented Apr 8, 2024

@erwanor has pointed out OOB that it is technically possible that we could feature-gate this functionality, but we all agree we don't want to perform those gymnastics, and we're happier just ripping it out.

@erwanor erwanor closed this as completed Apr 8, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Penumbra Apr 8, 2024
@conorsch
Copy link
Contributor

conorsch commented Apr 9, 2024

Done in #4169

conorsch added a commit to penumbra-zone/galileo that referenced this issue Jun 4, 2024
conorsch added a commit to penumbra-zone/galileo that referenced this issue Jun 4, 2024
conorsch added a commit to penumbra-zone/galileo that referenced this issue Jun 4, 2024
cratelyn pushed a commit to penumbra-zone/galileo that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: a bug C-enhancement Category: an enhancement to the codebase E-day E-easy Effort: Easy
Projects
Archived in project
Development

No branches or pull requests

3 participants