Skip to content

Remove vulpix reflective nightmare #3445

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

Merged

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@nicolasstucki nicolasstucki requested review from allanrenucci and OlivierBlanvillain and removed request for allanrenucci November 8, 2017 15:13
@@ -33,10 +33,12 @@ class CompilationTests extends ParallelTesting {

// @Test // enable to test compileStdLib separately with detailed stats
def compileStdLib: Unit = {
implicit val testGroup: TestGroup = TestGroup("compileStdLib")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need to give an explicit type signature here because the implicit val is in a def.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want me to remove them? I added them to avoid warnings from the IDE.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your call.

@allanrenucci
Copy link
Contributor

Can you explain what a test group is and what it is used for

@nicolasstucki
Copy link
Contributor Author

It is used as the name of the first level of folder nesting in the output of the tests. For example all output of @Test def runAll = ... will be out/runAll. Inner folders are determined by the kind of tests you are executing. Previously the group name was generated by reflection inspecting the name of the method it was in, this was unnecessary, brittle and hard to understand in the cases where compilation tests depended on previous ones such as @Test def tastyBootstrap. In that case the inner defs where only present to give the group name to substeps of the tests and refactoring easily broke the expected output paths.

@nicolasstucki nicolasstucki force-pushed the remove-vulpix-reflective-nightmare branch from 25bb83a to 162867f Compare November 8, 2017 15:56
@allanrenucci
Copy link
Contributor

I think it’s weird that outputDirecrory is not the actual output directory. It is also weird to add a new abstraction just to specify the output directory. Also we now have test group and test category that are two completely different things
Can we just use the existing outputdirectory parameter?

@nicolasstucki
Copy link
Contributor Author

The test group was also used to determine the title of the tests. I wonder if we could instead remove the outputdirectory parameter.

@nicolasstucki nicolasstucki requested review from allanrenucci and removed request for OlivierBlanvillain November 8, 2017 16:58
@nicolasstucki
Copy link
Contributor Author

Yes, the output directory was only used twice and was API overkill.

@@ -0,0 +1,3 @@
package dotty.tools.vulpix

case class TestGroup(name: String) extends AnyVal
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document what a TestGroup is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@nicolasstucki nicolasstucki merged commit ed2feb2 into scala:master Nov 11, 2017
@allanrenucci allanrenucci deleted the remove-vulpix-reflective-nightmare branch December 14, 2017 19:24
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.

3 participants