On Thursday, 30 April 2015 at 02:26:19 UTC, Steven Schveighoffer wrote:
On 4/29/15 7:43 AM, Dicebot wrote:
On Wednesday, 29 April 2015 at 04:53:47 UTC, Steven Schveighoffer wrote:
or rdmd -main -unittest -> fail to build because the templated unit
test doesn't work on your code. Good luck with that.

I will create an upstream PR to fix it, problem solved. Have never had a
need to do so though, not even a single time.

Also : can you please point me again what part of RBT causes compilation slowdowns with version(unittest)? I looked through and found only
runtime checks.

It's runtime checks that slow down, the unit test compilation is not slow (although it was at one point, but that was for the proper full unit tests).

Then test separation + custom runtime filter fixes the issue without language changes.

And for that "move out of the aggregate" + "runtime test
filtering" does what you want.

Move out of the aggregate makes it oh so ugly. I want my unit tests right where they belong.

Runtime test filtering seems like it adds more complexity to the system unnecessarily. All I need is a way to say "yes compiler, I want to run those templated unit tests I imported" or "no compiler, I don't want to do that". What the default is really isn't important.

It is exactly the other way around. Implementing such compile-time filtering would mean adding totally new feature to the language, considerably complicating version system which is very simple right now. And remembering all the issues we had with -allinst it will take a while to figure out. You need something better than "ugly" to justify such language change. Especially when there is a working solution within existing rules - even if it seems ugly, it is achievable without language changes and addresses the issue.

Reply via email to