Skip to content

Conversation

@peter-lyons-kehl
Copy link

tl;dr Trybuild is better than it may seem for users with complex setups, who already have, or are used to having compilation-failing source files outside their src/ tree.

For example, users may already have compilation-failing sources positioned somewhere outside src/, because of their existing script-based testing (that they want to move away from and move to trybuild).

Or, they may want to test (compilation failure) of the same sources under various combinations of features, but (for whatever reason) they don't want to pass the features to cargo test, but they set up one test crate per feature combination.

But It was only after some experimentation, almost an accident, that I've noticed that trybuild does store relative paths in .stderr (instead of absolute paths), but only if the path passed to t.compile_fail(...) does not contain "..".

I understand that there may be more restrictions on this, and that there's no guarantee. But, since this work, mentioning this, at least as a hint, would

@peter-lyons-kehl
Copy link
Author

If this is acceptable-in-principle, feel free to reword as you like, or suggest what to change/reword and I'll update the PR. Thx.

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.

1 participant