Skip to content

Conversation

@Johnabell
Copy link

This PR addresses the issue raise in #520.

It adds a new macro that only outputs the tokens when this crate is running under test. This can then be used in other macros outputs in place of #[cfg(test)] to ensure that when foreign crates use the exported macros the do not get the parts intended for internal testing.

The other option that could be considered is making a "testing" feature if you would like these to be available for testing in foreign crates too.

@Johnabell Johnabell force-pushed the fix-unit-tests-foreign-crates-unit-macro branch 2 times, most recently from 53dfc35 to c090850 Compare June 6, 2025 20:07
@TheComamba
Copy link
Contributor

Are the merge conflicts preventing this PR from being merged? I think the issue resolved by it is stopping several people from using uom 0.37.

@Johnabell Johnabell force-pushed the fix-unit-tests-foreign-crates-unit-macro branch from c090850 to 795b630 Compare December 27, 2025 22:09
@Johnabell
Copy link
Author

@TheComamba I have rebased to address the conflicts

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