Skip to content
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

Break up repo? #1024

Closed
ryan-williams opened this issue Dec 5, 2016 · 2 comments
Closed

Break up repo? #1024

ryan-williams opened this issue Dec 5, 2016 · 2 comments

Comments

@ryan-williams
Copy link

As a long time scalatest user (thanks for this library!), I just cloned the source to try to poke around it more, and I'm finding it to be quite unwieldy; 568k lines of scala in what appear to be a dozen or so distinct modules.

I attempted to sbt test-compile after setting the JDK8 SBT_OPTS from the README, and gave up after 10s of minutes of what look like GC stall; I'm on a late-2013 macbook pro, 4 cores, 8GB RAM.

Intellij also had considerable difficulty understanding/navigating the project, to the point of being unusable.

This is a drive-by comment but it seems like there could be benefits to putting some of the subprojects here in their own repos.

@bvenners
Copy link
Contributor

bvenners commented Dec 5, 2016

Yes, it is awfully big, but that's mostly because we have soooo many tests. For some reason we seem to like testing. Part of that too is redundancy, which we haven't found the time to remove as yet.

What I do is

sbt compile
sbt test:compile

I do that in separate steps. Or if I'm just working on Scalactic at the time, I may just do:

sbt compile // compiles Scalactic and ScalaTest
sbt "project scalactic-test" test:compile // compiles just Scalactic's tests

But that's not all of the story, because to really compile everything you need to compile the whole thing under 2.10 and 2.11 (under Java 6) and 2.12 (under Java 8), as well as Scala.js on 2.10, 2.11, and 2.12. And we're wanting to cross build to Dotty too before too long.

Upshot is: there's no way we can separate these into different projects. We need them together so we can do all these builds in one place.

@bvenners bvenners closed this as completed Dec 5, 2016
@ryan-williams
Copy link
Author

ryan-williams commented Dec 5, 2016

Thanks for that context. Some inlines:

mostly because we have soooo many tests. For some reason we seem to like testing

😀 fwiw here are the top 10 3-level-deep directories in the project by LoC of Scala:

  2574	project/GenInspectorsShorthands.scala
  2586	common-test/src/main
  2710	project/GenGen.scala
  3127	project/GenFactories.scala
  8008	scalactic-macro/src/main
 14263	scalactic/src/main
 14581	examples/src/test
 20449	scalactic-test/src/test
150085	scalatest/src/main
338601	scalatest-test/src/test
568228	total

Indeed it is mostly tests.

What I do is

sbt compile
sbt test:compile

I do that in separate steps.

I actually had done that too in my attempts yesterday, and still had the issues described.

Upshot is: there's no way we can separate these into different projects. We need them together so we can do all these builds in one place.

I don't think that this follows; surely there are logical components in this project (the top-level subdirs would seem to imply this) that could be factored out and depended on here (presumably as JARs on e.g. Maven Central) by the remaining pure-scalatest code.

Of course, "this would be nice but is a big project that no one has time for" is a fine answer, but "it has to (or should) be this way" does not seem very true or reasonable to me!

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

No branches or pull requests

2 participants