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

travis and classes.bak #47

Closed
fommil opened this issue Sep 4, 2014 · 37 comments
Closed

travis and classes.bak #47

fommil opened this issue Sep 4, 2014 · 37 comments

Comments

@fommil
Copy link

fommil commented Sep 4, 2014

I see this a lot

[error] (scoverage:compile) Could not create directory /home/travis/build/ensime/ensime-server/target/scala-2.11/classes.bak

But I'm also creating a lot of directories in my CI, so I know that travis doesn't just barf when directories are created.

Does the SBT file API perhaps throw if the dir already exists? This might just need a little bit of error handling to avoid this common race / io.

@sksamuel
Copy link
Member

sksamuel commented Sep 4, 2014

I see that error too. I don't know why it happens. I don't know who is
creating classes.bak either.

On 4 September 2014 21:58, Sam Halliday [email protected] wrote:

I see this a lot

error Could not create directory /home/travis/build/ensime/ensime-server/target/scala-2.11/classes.bak

But I'm also creating a lot of directories in my CI, so I know that travis
doesn't just barf when directories are created.

Does the SBT file API perhaps throw if the dir already exists? This might
just need a little bit of error handling to avoid this common race / io.


Reply to this email directly or view it on GitHub
#47.

@fommil
Copy link
Author

fommil commented Sep 4, 2014

given that sbt is basically 💩 I'm guessing it's sbt.

@sksamuel
Copy link
Member

sksamuel commented Sep 4, 2014

I saw your recent thread on sbt. I had to laugh it was fucking brilliant.

On 4 September 2014 22:56, Sam Halliday [email protected] wrote:

given that sbt is basically [image: 💩] I'm guessing it's sbt.


Reply to this email directly or view it on GitHub
#47 (comment)
.

@fommil
Copy link
Author

fommil commented Sep 5, 2014

And today somebody has gone and added MORE fucking magic to the sbt parser. They are on another planet.

@sksamuel
Copy link
Member

sksamuel commented Sep 5, 2014

I'll write typelevel build tool this weekend.
On 5 Sep 2014 08:07, "Sam Halliday" [email protected] wrote:

And today somebody has gone and added MORE fucking magic to the sbt
parser. They are on another planet.


Reply to this email directly or view it on GitHub
#47 (comment)
.

@fommil
Copy link
Author

fommil commented Sep 5, 2014

we use https://github.com/cage433/maker at work, which would be utterly amazing if it had the resources to bring it to the masses.

Imagine instead of abstract interfaces, being handed case classes containing real information.

Imagine instead of an "axis of configurations, scopes, tasks and monad state transformers", you had Tasks that depend on other Tasks, and the build tool tries its damndest to run as much stuff in parallel as possible. It took me 2 hours to write the ensime plugin... it took me a week to do the same for sbt.

@sksamuel
Copy link
Member

sksamuel commented Sep 5, 2014

Since I don't work I have the resources to do loads of plugins :)

I might have a bash this weekend dunno.

On 5 September 2014 09:26, Sam Halliday [email protected] wrote:

we use https://github.com/cage433/maker at work, which would be utterly
amazing if it had the resources to bring it to the masses.

Imagine instead of abstract interfaces, being handed case classes
containing real information.

Imagine instead of an "axis of configurations, scopes, tasks and monad
state transformers", you had Tasks that depend on other Tasks, and the
build tool tries its damndest to run as much stuff in parallel as possible.
It took me 2 hours to write the ensime plugin... it took me a week to do
the same for sbt.


Reply to this email directly or view it on GitHub
#47 (comment)
.

@fommil
Copy link
Author

fommil commented Sep 5, 2014

the author is currently working on add transitive dep support

@sksamuel
Copy link
Member

sksamuel commented Sep 5, 2014

Says in his readme.he doesnt like that
On 5 Sep 2014 12:01, "Sam Halliday" [email protected] wrote:

the author is currently working on add transitive dep support


Reply to this email directly or view it on GitHub
#47 (comment)
.

@fommil
Copy link
Author

fommil commented Sep 5, 2014

he has been persuaded otherwise. would you like me to put you in contact?

@sksamuel
Copy link
Member

sksamuel commented Sep 5, 2014

Contact for ...

On 5 September 2014 12:05, Sam Halliday [email protected] wrote:

he has been persuaded otherwise. would you like me to put you in contact?


Reply to this email directly or view it on GitHub
#47 (comment)
.

@fommil
Copy link
Author

fommil commented Sep 5, 2014

sorry, I misunderstood. You meant looking at this at the weekend, not looking at maker.

@sksamuel
Copy link
Member

sksamuel commented Sep 5, 2014

I meant I might dick about and write my own. Maker seems good but i want
one thats baaically a scala maven. Maven gets slagged off but its always
worked. Get rid of the xml and make it a bit more flexible. Winner.
On 5 Sep 2014 12:06, "Sam Halliday" [email protected] wrote:

sorry, I misunderstood. You meant looking at this at the weekend, not
looking at maker.


Reply to this email directly or view it on GitHub
#47 (comment)
.

@sksamuel
Copy link
Member

sksamuel commented Sep 5, 2014

My priority right now though is this breaded chicken sandwich that's taking
forever to cook
On 5 Sep 2014 12:09, "Stephen Samuel (Sam)" [email protected] wrote:

I meant I might dick about and write my own. Maker seems good but i want
one thats baaically a scala maven. Maven gets slagged off but its always
worked. Get rid of the xml and make it a bit more flexible. Winner.
On 5 Sep 2014 12:06, "Sam Halliday" [email protected] wrote:

sorry, I misunderstood. You meant looking at this at the weekend, not
looking at maker.


Reply to this email directly or view it on GitHub
#47 (comment)
.

@fommil
Copy link
Author

fommil commented Sep 5, 2014

actually, I know what you mean. I think a simple DSL that converts a terse language spec (like what SBT keep aiming for) into maven files would be awesome. That way, the entire maven infrastructure can be pulled in... but I don't think maven is very efficient at compiling scala and it doesn't do parallelism very well.

maker is very stable on our project. It just lacks a lot of features you'd normally want.

@sksamuel
Copy link
Member

sksamuel commented Sep 5, 2014

It's actually not hard to write a build tool. You pull in some deps using
Aether. And then you invoke scalac with the classpath pointing to them.

What's hard is coming up with the worst API I've ever seen in the history
of computing. That took some real talent and whoever designed SBT is an
expert.

On 5 September 2014 12:19, Sam Halliday [email protected] wrote:

actually, I know what you mean. I think a simple DSL that converts a terse
language spec (like what SBT keep aiming for) into maven files would be
awesome. That way, the entire maven infrastructure can be pulled in... but
I don't think maven is very efficient at compiling scala and it doesn't do
parallelism very well.

maker is very stable on our project. It just lacks a lot of features
you'd normally want.


Reply to this email directly or view it on GitHub
#47 (comment)
.

@fommil
Copy link
Author

fommil commented Sep 5, 2014

hehe. zinc is the way to do the compile.

If you're serious about it, I really recommend looking at maker. It's a solid foundation that has been hardened with real world experience and both its domain objects and philosophy are easy to understand. It could do with some topping and tailing for use in the open source world.

@fommil
Copy link
Author

fommil commented Sep 5, 2014

my wishlist for maker cage433/maker#96

@sksamuel
Copy link
Member

sksamuel commented Sep 5, 2014

Yeah I don't want to start something if there's no interest (ie the only
people who hate it are plugin writers), and maker seems like he has it
licked. Although development seems to have slowed on it.

The most annoying thing about SBT is that most of the bugs on scoverage are
SBT related. I can't fix most of them as I can't figure out how to get SBT
to do what I want, and no one (except Jacek) answers my questions on SO.

On 5 September 2014 12:36, Sam Halliday [email protected] wrote:

my wishlist for maker cage433/maker#96
cage433/maker#96


Reply to this email directly or view it on GitHub
#47 (comment)
.

@fommil
Copy link
Author

fommil commented Sep 5, 2014

dev happens when it is needed by the project it supports ;-) github doesn't tell the full story

@fommil
Copy link
Author

fommil commented Sep 5, 2014

I think the demand for a better build tool is quite strong. Any substantially large project starts to need to touch the build tool, and the dependency resolution times are just insane (which again impacts larger projects the most).

@sksamuel
Copy link
Member

sksamuel commented Sep 5, 2014

Why is it insane? Slow to download, slow to find out what it needs,...?

On 5 September 2014 13:50, Sam Halliday [email protected] wrote:

I think the demand for a better build tool is quite strong. Any
substantially large project starts to need to touch the build tool, and the
dependency resolution times are just insane (which again impacts larger
projects the most).


Reply to this email directly or view it on GitHub
#47 (comment)
.

@fommil
Copy link
Author

fommil commented Sep 5, 2014

very slow to work out what it needs. 10 minutes in some cases.

@fommil
Copy link
Author

fommil commented Sep 5, 2014

it uses ivy, and it is single threaded. also the downloads are very slow... I think it's also serial.

@fommil
Copy link
Author

fommil commented Sep 5, 2014

@sksamuel would it help the stability if you used a different target directory entirely for the instrumented binaries?

@sksamuel
Copy link
Member

sksamuel commented Sep 5, 2014

not sure I can because I'd have to update all the keys in sbt to point there. I do point to scoverage-classes rather than just classes though.

Does this error only happen with scoverage?

@sksamuel
Copy link
Member

sksamuel commented Sep 5, 2014

Doesn't seem to be an scoverage thing.

typesafehub/sbt-multi-jvm#15

@sksamuel
Copy link
Member

sksamuel commented Sep 6, 2014

Well we write to scoverage-classes instead of classes
On 5 Sep 2014 17:59, "Sam Halliday" [email protected] wrote:

@sksamuel https://github.com/sksamuel would it help the stability if
you used a different target directory entirely for the instrumented
binaries?


Reply to this email directly or view it on GitHub
#47 (comment)
.

@RichardBradley
Copy link
Contributor

Doesn't seem to be an scoverage thing.

typesafehub/sbt-multi-jvm#15

It's not directly an scoverage bug, but only plugins that do compilation in parallel tickle this SBT bug -- notice that the linked bug is an issue in sbt-multi-jvm (does multiple compilations in parallel), not in core sbt.

I'll raise a core SBT issue to see if they can help diagnose.

@RichardBradley
Copy link
Contributor

(Hmm - not sure whether to link to this "sbt is shit" thread from my new SBT bug ;-)

@sksamuel
Copy link
Member

Hahah
On 14 Oct 2014 11:50, "Richard Bradley" [email protected] wrote:

(Hmm - not sure whether to link to this "sbt is shit" thread from my new
SBT bug ;-)


Reply to this email directly or view it on GitHub
#47 (comment)
.

@fommil
Copy link
Author

fommil commented Oct 14, 2014

heh, oh they know my thoughts :-)

@sksamuel
Copy link
Member

Maybe in the meantime, Scoverage should just disable parallel compilation?

@RichardBradley
Copy link
Contributor

That would be quite helpful. Do you know how? I tried to figure out how to disable parallel tasks for scoverage builds, but leave them on for normal builds, but gave up and disabled it for all my builds (noticeably slower :( )

@sksamuel
Copy link
Member

Not off top of my head but perhaps setting it directly in the plugin for
the ScoverageTest scope will do it.
On 15 Oct 2014 11:08, "Richard Bradley" [email protected] wrote:

That would be quite helpful. Do you know how? I tried to figure out how to
disable parallel tasks for scoverage builds, but leave them on for normal
builds, but gave up and disabled it for all my builds (noticeably slower :(
)


Reply to this email directly or view it on GitHub
#47 (comment)
.

@RichardBradley
Copy link
Contributor

Did that commit fix the issue for you?
ISTR trying that change and finding that it didn't make any difference, as the parallel stuff was happening in a different scope ("compile" or something).

@sksamuel
Copy link
Member

sksamuel commented Nov 5, 2014

Well it worked when I ran the tests a few times, since this error barely
happens for me anyway, 1 in 100 say, it's hard to confirm for sure.

On 5 November 2014 22:16, Richard Bradley [email protected] wrote:

Did that commit fix the issue for you?
ISTR trying that change and finding that it didn't make any difference, as
the parallel stuff was happening in a different scope ("compile" or
something).


Reply to this email directly or view it on GitHub
#47 (comment)
.

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

3 participants