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

Feature-gating masonry's dependency on nv-flip #801

Open
mwcampbell opened this issue Dec 27, 2024 · 1 comment
Open

Feature-gating masonry's dependency on nv-flip #801

mwcampbell opened this issue Dec 27, 2024 · 1 comment

Comments

@mwcampbell
Copy link
Contributor

I think it would make sense to feature-gate masonry's dependency on nv-flip, which is only necessary for screenshot-based testing and so should never be used in a real application. nv-flip brings a C++ library, increasing build time and complexity, and possibly influencing other aspects of the application build (e.g. whether the shared or static C++ standard library is used on Android).

@DJMcNab
Copy link
Member

DJMcNab commented Jan 6, 2025

Agreed. The difficulty here is that Cargo doesn't allow having required features for testing. That being said, if we adopt an xtask pattern (which we probably want anyway to enforce nextest usage + with Kompari), we can kill two birds with one stone:

#[cfg(not(feature = "test"))]
#[test]
fn must_use_xtask() {
     panic!("To run tests use `cargo xtask test`. This enables required libraries and ensures that GPU over-access doesn't cause spurious failures");
}

That needn't necessarily block this, as we never actually use the test infrastructure externally anyway.

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

No branches or pull requests

2 participants