-
Notifications
You must be signed in to change notification settings - Fork 381
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
[ base,tests ] Reduce dependency on contrib
#1595
Conversation
The previous test-runner implementation relied on `Future` from `contrib` and spawned a new future for each test instead of re-using the threads (expected behaviour in a pool). This commit removes the dependency on `Future` (since `contrib` libs are generally considered experimental) in favour of using the built-in concurrency primitives. It also re-uses threads for running the tests in each TestPool, by sending tests and receiving results over `Channel`s. No behaviour in the tests is altered; they are still observed to work correctly and run in parallel.
Just a quick note (since there's a PR review spree going on) that this is still being worked on. Currently ironing out merging with the latest |
@CodingCellist This seems to be working on my machine, should we consider this ready? |
I'm planning to merge this by the end of the week. Make yourself known if you don't think it's a good idea. :) |
@gallais Hi! Yes! Sorry! I meant to reply to this a week ago and then got distracted ^^;; It seems to work on my machine as well, which is really neat, so I'm happy for this to be merged! I'm somewhat confused as to why it's fixed itself, but I suspect it could've been something to do with #1596... |
🚢 |
@CodingCellist @gallais The change to test.ipkg broke my bootstrap script in #1992. Shall I add |
I see... We can't rely on the builds to check that these dependencies are correct because we're passing
😫 I'd say put back the |
My bootstrap script does away with that nonsense, so you'll be able to rest easy 😉
Done. |
In an attempt to minimise the number of dependencies on
contrib
in the core of the language, tests can be run in parallel using the lower-levelfork
andChannel
. On the one lucky run where everything worked, this also seems to be faster, possibly due to re-using threads. However this implementation led me to discover #1552 and as such, this should not be merged until #1552 is fixed.