Skip to content

Conversation

Oppen
Copy link
Contributor

@Oppen Oppen commented Sep 11, 2025

Rationale:

  1. pin-project only produces a few generics and introduces a few
    macros, meaning virtually no compile time or binary size overhead, so
    having it build inconditionally is not a problem;
  2. Using a conditional feature means we need to propagate to the topmost
    manifest to actually use it;
  3. It is reasonable enough to run this whenever we want extra checks,
    that is when we use debug-assertions.

So, remove the feature, force the dependency and enable the check for
debug-asserted builds.

@Oppen Oppen force-pushed the feat/warn-on-block-debug-assertions branch from 635fb5a to 80e3f51 Compare September 11, 2025 20:08
Rationale:
1. `pin-project` only produces a few generics and introduces a few
   macros, meaning virtually no compile time or binary size overhead, so
   having it build inconditionally is not a problem;
2. Using a conditional feature means we need to propagate to the topmost
   manifest to actually use it;
3. It is reasonable enough to run this whenever we want extra checks,
   that is when we use `debug-assertions`.

So, remove the feature, force the dependency and enable the check for
debug-asserted builds.
@Oppen Oppen force-pushed the feat/warn-on-block-debug-assertions branch from 80e3f51 to 3fba5cf Compare September 11, 2025 20:24
Copy link
Collaborator

@ElFantasma ElFantasma left a comment

Choose a reason for hiding this comment

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

I buy it

futures = "0.3.1"
thiserror = "2.0.12"
pin-project-lite = { version = "0.2", optional = true }
pin-project-lite = "0.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

We should add a comment saying this is used only when debug_assertions is enabled

@ElFantasma ElFantasma merged commit 1964fd2 into main Oct 1, 2025
3 checks passed
@MegaRedHand MegaRedHand deleted the feat/warn-on-block-debug-assertions branch October 1, 2025 21:18
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.

3 participants