eupn / macrotest

Test harness for declarative and procedural macros expansion via `cargo-expand`
47 stars 9 forks source link

Support workspace inheritance #74

Closed taqtiqa-mark closed 5 months ago

taqtiqa-mark commented 2 years ago

I've encountered this issue while implementing a infinyon/fluvio plugin-style integration test harness for Minitest, PR tikv/minitrace-rust/pull/127.

I have now reproduced the issue in a test-virtual project that will, hopefully, land here via PR #72.

The test-virtual example shows how to setup macrotest with a generic (non-libtest) test harness, and allows macrotest users to compare this plugin-style integration test suite with the default Rust libtest test harness.

At the moment the test-virtual project returns this error:

cargo test integration-tests 

<snip>

Expansion error:
error: Package `wrkspc-test-tests v0.0.0 (/home/user/src/macrotest/test-virtual/target/tests/wrkspc-test/macrotest000)` does not have the feature `test-feature`

I've banged my head on both projects but can't seem to figure out where the mismatch is occuring.

Appreciate any help or insights you can share.

taqtiqa-mark commented 2 years ago

Note to self to investigate possible workaround:

Cargo virtual manifests do not support the [features] stanza (without also having the [package] stanza). See Cargo issue 4942.

taiki-e commented 5 months ago

This is because workspace inheritance is not yet supported. EDIT: https://github.com/eupn/macrotest/issues/74#issuecomment-2027926800

taiki-e commented 5 months ago
error: Package `wrkspc-test-tests v0.0.0 (/home/user/src/macrotest/test-virtual/target/tests/wrkspc-test/macrotest000)` does not have the feature `test-feature`

Ah, nah, the direct reason for this error itself could be due to a failure to parse the edition (fixed by https://github.com/eupn/macrotest/pull/92).

However, as far as I can see #72, even if that error is fixed, it is likely that another error will be shown because of the workspace inheritance.