Skip to content

Fix import of OutputSubstition in send::v2 test#802

Merged
spacebear21 merged 1 commit intopayjoin:masterfrom
DanGould:fix-output-substitution-import
Jun 24, 2025
Merged

Fix import of OutputSubstition in send::v2 test#802
spacebear21 merged 1 commit intopayjoin:masterfrom
DanGould:fix-output-substitution-import

Conversation

@DanGould
Copy link
Contributor

@DanGould DanGould commented Jun 24, 2025

It is used in v2 tests but only exported at root with v1 feature

problem line:

use crate::{HpkeKeyPair, OutputSubstitution};

@DanGould DanGould requested a review from spacebear21 June 24, 2025 20:54
@coveralls
Copy link
Collaborator

coveralls commented Jun 24, 2025

Pull Request Test Coverage Report for Build 15862177983

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 86.011%

Totals Coverage Status
Change from base Build 15861266504: 0.0%
Covered Lines: 7815
Relevant Lines: 9086

💛 - Coveralls

@spacebear21
Copy link
Collaborator

When does the problem occur? You linked to the problem line but output_substitution is already pub(crate) so this shouldn't be a problem?

pub(crate) mod output_substitution;

@DanGould
Copy link
Contributor Author

it's pub crate but only accessible by crate::output_substitution::OutputSubstitution, not crate::OutputSubstitution

@DanGould
Copy link
Contributor Author

it occurs when payjoin/v2 is enabled but not payjoin/v1

@spacebear21
Copy link
Collaborator

spacebear21 commented Jun 24, 2025

Ok I see now. How come CI didn't catch that? As simple as cargo test send to reproduce the failure locally on latest master.

@spacebear21
Copy link
Collaborator

Oh, CI just runs with --all-features. Am I misremembering that we had changed it to run with individual features at some point?

Copy link
Collaborator

@spacebear21 spacebear21 left a comment

Choose a reason for hiding this comment

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

utACK

@spacebear21
Copy link
Collaborator

We may want to follow up with a cleanup in places that currently use crate::output_substitution::OutputSubstitution

@DanGould
Copy link
Contributor Author

DanGould commented Jun 24, 2025

it might make sense for me to just fully qualify that problem line since that sort of makes it more clear that it's internal; doesn't really need to be pub in that case since it's in internal use for testing.

And then we don't need another cleanup.

It's only available at crate:: when `v1` is enabled.
@DanGould DanGould force-pushed the fix-output-substitution-import branch from 43c9f0f to 94c18f0 Compare June 24, 2025 21:45
@spacebear21 spacebear21 changed the title Fix v1-only export of OutputSubstitution Fix import of OutputSubstition in send::v2 test Jun 24, 2025
@spacebear21 spacebear21 merged commit f6d4a61 into payjoin:master Jun 24, 2025
7 checks passed
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