adept-dm / adept

Adept - the predictable dependency management system
171 stars 10 forks source link

Lockfile progress is faulty #34

Open freekh opened 10 years ago

freekh commented 10 years ago

Progress on the lockfiles seems to be broken in the adept build. My assumption is that if there are multiple downloads going on at the same time, we will have issues.

Need a thread safe way to handle this.

freekh commented 10 years ago

@aknuds1 this might be a good one for you as well. When downloading I often notice that (in particular) when it is finished the percentage is wrong (I get stuff like -81% for example) - likely to be threading issues since it is not thread safe and downloads are threaded. Just one note: we should definitely not use locks to solve this, since it will hurt perf. Using atomicInteger for the progress and/or volatiles (for the rest) might solve this.

NOTE: this issue is related to #35 in the sense that this issue will need to get fixed before we fix #35

aknuds1 commented 10 years ago

@freekh Can you produce a scenario that will exhibit this behaviour?

freekh commented 10 years ago

Normally it will actually fail on adept-core itself . try to rm cache then compile a couple of time

On June 27, 2014 8:01:46 PM CEST, Arve Knudsen notifications@github.com wrote:

@freekh Can you produce a scenario that will exhibit this behaviour?


Reply to this email directly or view it on GitHub: https://github.com/adept-dm/adept/issues/34#issuecomment-47381249

Sent from my Android device with K-9 Mail. Please excuse my brevity.

aknuds1 commented 10 years ago

So you're saying I can just run sbt compile (after deleting .adept/cache) in adept?

freekh commented 10 years ago

Yes, at least I think so. Maybe it is better I repro properly myself than having you chase a ghost bug though. WIll update this the next time I see and stand a better chance of having a clean repro steps

aknuds1 commented 10 years ago

I've tried compiling adept (sbt compile) a couple of times now, and it doesn't touch ~/.adept. I've actually deleted adept, and it's not re-created.

freekh commented 10 years ago

Hmm, ok,. I will look into this to find the correct repro steps.

On June 29, 2014 6:38:34 PM CEST, Arve Knudsen notifications@github.com wrote:

I've tried compiling adept (sbt compile) a couple of times now, and it doesn't touch ~/.adept. I've actually deleted adept, and it's not re-created.


Reply to this email directly or view it on GitHub: https://github.com/adept-dm/adept/issues/34#issuecomment-47459755

Sent from my Android device with K-9 Mail. Please excuse my brevity.