Skip to content
This repository has been archived by the owner on Aug 12, 2021. It is now read-only.

Initial roadmap #2

Open
gnzlbg opened this issue Mar 4, 2019 · 2 comments
Open

Initial roadmap #2

gnzlbg opened this issue Mar 4, 2019 · 2 comments

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Mar 4, 2019

We should come up with a couple of goals for the roadmap of what to do next. The first goal is probably making the crate usable. For that we need to:

  • get it running on stable Rust, and
  • get rust-lang/rust to use it as is.

To get it running on stable Rust we can just try to stop using unstable Rust features. To get rust-lang/rust to use it, the main blocker was the relationship between #[ignore] and #[test] which was discussed in the internal thread (https://internals.rust-lang.org/t/a-path-forward-towards-re-usable-libtest-functionality-custom-test-frameworks-and-a-stable-bench-macro/9139).

@alexcrichton proposed the following:

I’m not sure I completely follow the trickiness with #[test] and #[ignore] orderings, but it seems to me like we could make both of them procedural macros in the prelude by default perhaps? If both #[test] and #[ignore] were routed to the same procedural macro, it wouldn’t matter which runs first and #[ignore] would just otherwise verify that #[test] exists (removing it).

In the meantime there are also a couple of things that we might want to do, but that's probably better to discuss them in their own issues:

  • refactor argument parsing, formatting, json, etc. to make them reusable for other custom test frameworks
  • refactor testing and benchmarking into different crates, so that one doesn't need to pull in the whole testing infrastructure for benchmarks and vice-versa
  • use the real term crate instead of our own fork
  • make sure that libtest is usable as a custom_test_framework (and potentially "libbench" as well if we have splitted them in two)

cc @djrenren

@euclio
Copy link

euclio commented Mar 8, 2019

I'd suggest replacing term with the termcolor crate instead. That's what rustc and cargo use. (rust-lang/rust#45728)

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Mar 11, 2019

@euclio that sounds like a great idea !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants