Page 1 of 1

Suggestion for next release...

Posted: 2009-07-21 5:06 pm
by velo
Right know if you try to instrument the same js twice jscoverage produces this error:
[INFO] jscoverage: jscoverage.js: script contains line with more than 65,535 characters

May be jscoverage could detect the file is already instrumented and skip.


BTW, any hope of in place instrumenting, so no source/dest-dirs.... just providing source-dirs will instrument.


Any idea when next release comes out?


VELO

Re: Suggestion for next release...

Posted: 2009-07-21 11:22 pm
by Ed
velo wrote:Right know if you try to instrument the same js twice jscoverage produces this error:
[INFO] jscoverage: jscoverage.js: script contains line with more than 65,535 characters

May be jscoverage could detect the file is already instrumented and skip.
I'm curious about the situation where that would be useful: You are instrumenting a directory that already contains (some) instrumented JavaScript files? Can you describe this in more detail?
velo wrote:BTW, any hope of in place instrumenting, so no source/dest-dirs.... just providing source-dirs will instrument.
I hesitate to add such a feature, for fear that I will receive irate complaints from users saying that jscoverage irrevocably mangled their JavaScript :/ Generally I would think you could just do this:

Code: Select all

mv DIR DIR-original
jscoverage DIR-original DIR
velo wrote: Any idea when next release comes out?
Probably a few months. There are some features I want to add.


VELO[/quote]

Re: Suggestion for next release...

Posted: 2009-07-23 5:06 pm
by velo
Ed wrote:
velo wrote:Right know if you try to instrument the same js twice jscoverage produces this error:
[INFO] jscoverage: jscoverage.js: script contains line with more than 65,535 characters

May be jscoverage could detect the file is already instrumented and skip.
I'm curious about the situation where that would be useful: You are instrumenting a directory that already contains (some) instrumented JavaScript files? Can you describe this in more detail?
That isn't useful =D

In fact I got that by accident.

My builds are automated using maven, and maven automatically compile, package, test my application...

And I set maven to instrument my JS files using jscoverage before tests. But, sometimes I don't clean the last build, so I got this error.

Re: Suggestion for next release...

Posted: 2009-07-24 3:15 pm
by Ed
velo wrote:That isn't useful =D

In fact I got that by accident.
I think I understand now.

So, if the jscoverage program detects that the source directory contains instrumented code, it should just print out a more comprehensible error message and then exit.

Re: Suggestion for next release...

Posted: 2009-07-26 5:21 pm
by Ed
The code in the Subversion repository now checks for instrumented files in the source directory.