Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I am curious if you are using SBT incremental builds? (putting aside how hard it can be to get and keep SBT working for a project ... I was the guy that had to do that so I know that pain quite well). Because in my experience with really large scala projects that should not be the case, unless you modify a file at the very top of the dependency tree.

We used what I would call the package object predef pattern, which basically involved, rolling your own predef to have certain functions / extension classess / objects always in scope through package objects added to each sub-project. And the build would cross-compile both jvm scala and scalajs. It would not take more than a second or two unless one of those predef files were touched (which would fire off effectively a full rebuild).



Well, neither I, nor anybody at the startup I work at apparently (it would seem) has been able to figure it out.

Out of curiosity, how many hours do you think it would take to get the compile time down? I wonder if we could find somebody to help us with that.


At first I would try sbt-tmpfs, and then the largest factor in compile time imho are dependencies. Make sure that you split your project in submodules of semantically valid units. That reduce the amount of code that has to be analyzed. And then make sure that you don't have many unused imports.

In every project I've been are some former Eclipse users that are accustomed to collapsing all imports and adding new ones automatically. They never look at their ever growing list of unused files that are searched, loaded, and parsed.


It kind of depends on what you are looking for. It sounds like it's improving compilation times while you develop so you can get errors messages from the compiler and so on faster which SBT incremental compilation should help with.

Are you guys currently using SBT? If so, is incremental compilation not working for some reason (or are you not aware of it?).

In terms of time, it would really depend on the size of the project and what is currently in place. It could be a couple of hours to a few days.

BTW my email is in my hn profile you want to discuss more privately.


Yeah we are using SBT. I'm off this week, but next week I can try to see if this has legs. I checked your profile but didn't see an email.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: