Another Another 1.6.3 snapshot

23 views
Skip to first unread message

Bill Venners

unread,
Jan 5, 2012, 4:53:39 AM1/5/12
to scalate...@googlegroups.com
Hi All,

I just released yet another 1.6.3 snapshot. This one contains fixes
for the issues that Ismael found today:

1. put my SuiteAborted in sbt fix that Bruce Mitchener approved back
on December 8 back into the branch. Sorry it had gotten lost in the
shuffle. This should solve the problem Ismael observed whereby an
OutOfMemoryError was not being reported by sbt.

2. -u will now create a directory for the JUnit XML files if the
requested directory doesn't already exist, in both Runner and via sbt

3. ScalaTest will automatically turn off color if it notices a system
property named "sbt.log.noformat" is defined and set to "true".

I also renamed ValueOnOption to OptionValues, ValueOnEither to
EitherValues, and ValueOnPartialFunction to PartialFunctionValues. And
I changed the syntax for EitherValues from either.LeftValue and
either.rightValue to either.left.value and either.right.value. And I
dropped ValueMethods entirely.

The way the noformat issue happened is we started sending out the
"standard out" text directly through our own standard output reporter
rather then sending them as events to sbt's logger. I'm not yet 100%
sure if that's the right thing to do, but it explains what happened.
Previously since we were sending the colorful text to sbt's logger for
outputting, sbt must have been stripping off the ansi color chars if
sbt.log.noformat was set.

The snapshot is compiled with Java 6 and Scala 2.9.0, and is in the usual place:

http://scala-tools.org/repo-snapshots/org/scalatest/scalatest_2.9.0/1.6.3-SNAPSHOT/

I put up a new Scaladoc for tonight's snapshot here:

http://www.artima.com/docs-scalatest-1.6.3-5.Jan.2012/#package

Please give it a try if you have time.

Thanks.

Bill
----
Bill Venners
Artima, Inc.
http://www.artima.com

ijuma

unread,
Jan 5, 2012, 5:48:54 AM1/5/12
to scalate...@googlegroups.com
Thanks for the quick turnaround Bill. One issue I noticed below.

On Thursday, 5 January 2012 09:53:39 UTC, Bill Venners wrote:

2. -u will now create a directory for the JUnit XML files if the
requested directory doesn't already exist, in both Runner and via sbt

There is a race condition in the fix:

            if (!directory.isDirectory) {
              try {
                if (!directory.mkdirs())
                  throw new IllegalArgumentException("Unable to create directory: " + directory.getAbsolutePath)
              }
              catch {
                case se: SecurityException => 
                  throw new IllegalArgumentException("Unable to create directory: " + directory.getAbsolutePath)
              }
            }
          }

If the tests are executed in parallel (default in SBT), you will get failures (I did) because only one mkdirs will succeed and others will fail.

Best,
Ismael

Bill Venners

unread,
Jan 5, 2012, 8:05:53 AM1/5/12
to scalate...@googlegroups.com
Hi Ismael,

Oops! Sorry to drag you into being our SQA department. We'll fix this
and get yet another snapshot out the door. I appreciate very much your
trying it out and giving feedback.

Bill

> --
> You received this message because you are subscribed to the Google
> Groups "scalatest-users" group.
> To post to this group, send email to scalate...@googlegroups.com
> To unsubscribe from this group, send email to
> scalatest-use...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/scalatest-users?hl=en
> ScalaTest itself, and documentation, is available here:
> http://www.artima.com/scalatest

--

ijuma

unread,
Jan 5, 2012, 8:55:05 AM1/5/12
to scalate...@googlegroups.com
On Thursday, 5 January 2012 13:05:53 UTC, Bill Venners wrote:

Oops! Sorry to drag you into being our SQA department.

Glad to help. :)

Best,
Ismael

ijuma

unread,
Jan 5, 2012, 9:24:59 AM1/5/12
to scalate...@googlegroups.com
Hi Bill,

Found one more issue. If I run the following with SBT 0.11.2 and -u, no XML file is generated:

sbt "subprojectName/test-only *SomeTestName"

However, if I have more than one test-only invocation, the files _are_ generated. Also, if I invoke the command from the SBT shell, then the files are generated.

This leads me to believe that files are not being flushed/closed appropriately before SBT terminates in the case where it doesn't work. Is that possible? If not, do you have any idea why this could be happening?

Best,
Ismael

Bill Venners

unread,
Jan 5, 2012, 1:38:37 PM1/5/12
to scalate...@googlegroups.com
Hi Ismael,

Yes, Chee Seng found a similar issue. The problem likely stems from
the fact that events fired at reporters are serialized with an receive
actor, and that actor's thread is the one writing the XML files. It
isn't being given a chance to finish the job before the whole VM exits
when you're running sbt from the command line like that.
Straightforward to fix, as we have the same need with Runner and
addressed it long ago, though I have to remind myself how by looking
at the code! Chee Seng already checked in a fix for the race condition
issue. If that looks good I'll deploy a snapshot with just that, then
do another once we fix the termination issue.

Bill

> --
> You received this message because you are subscribed to the Google
> Groups "scalatest-users" group.
> To post to this group, send email to scalate...@googlegroups.com
> To unsubscribe from this group, send email to
> scalatest-use...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/scalatest-users?hl=en
> ScalaTest itself, and documentation, is available here:
> http://www.artima.com/scalatest

--

Bill Venners

unread,
Jan 5, 2012, 3:26:36 PM1/5/12
to scalate...@googlegroups.com
Hi Ismael,

I checked the code and it is not quite snapshot-worthy yet. We'll work
on it again tonight and do a new snapshot at that time.

Thanks.

Bill

ijuma

unread,
Jan 6, 2012, 8:07:23 AM1/6/12
to scalate...@googlegroups.com
On Thursday, 5 January 2012 20:26:36 UTC, Bill Venners wrote:

I checked the code and it is not quite snapshot-worthy yet. We'll work
on it again tonight and do a new snapshot at that time.

Thanks Bill. Looking forward to it.

Best,
Ismael

Bill Venners

unread,
Jan 6, 2012, 9:22:58 AM1/6/12
to scalate...@googlegroups.com
Hi Ismael,

I'm about to board a plane. We finished the software changes last
night, but I still have some documentation to complete. Will do that
on the flight and try and post new snapshots tonight.

Bill

ijuma

unread,
Jan 6, 2012, 9:34:45 AM1/6/12
to scalate...@googlegroups.com
On Friday, 6 January 2012 14:22:58 UTC, Bill Venners wrote:

I'm about to board a plane. We finished the software changes last
night, but I still have some documentation to complete. Will do that
on the flight and try and post new snapshots tonight.

OK, great. I assume you haven't committed all the changes yet? The following commit 10 hours ago seemed a bit odd to me:


Best,
Ismael

Bill Venners

unread,
Jan 7, 2012, 10:47:28 AM1/7/12
to scalate...@googlegroups.com
Hi Ismael,

Well that's because I decided to pull -u out of this release. My
initial thought was to include a few things into this release that
people had asked for, but -u turned out to be more complicated than I
thought it would be. I want to make sure we get it right before I
release it, and since there's a workaround (an sbt plugin) everyone
seems to feel addresses their need in the meantime, I figured it is
best to just wait until 2.0. That way I can start the release
candidate process going for the other stuff sooner.

In 2.0 we're going to fix it the "right way," which is to enhance
sbt's Framework mechanism so it understands the notion of a "run." I
met with Mark Harrah, the sbt czar, a few weeks back, and we figured
out the basic approaches we want to take. Essentially sbt needs to be
able to tell a test framework that a run is starting, and once it can
do that, we can ensure needed directories are created at that point,
not each time a test class gets executed. I was going to deprecated -u
in 2.0 anyway, in favor of an "external DSL" for sbt instead, so I
think it is best to wait until then.

Bill

ijuma

unread,
Jan 7, 2012, 1:56:07 PM1/7/12
to scalate...@googlegroups.com
On Saturday, 7 January 2012 15:47:28 UTC, Bill Venners wrote:

Well that's because I decided to pull -u out of this release.


I wish I knew that before I spent the time to test and integrate it into our build process. Oh well, life in the bleeding edge, I guess.

Best,
Ismael 

Bill Venners

unread,
Jan 7, 2012, 2:42:52 PM1/7/12
to scalate...@googlegroups.com
Hi Ismael,

Yes, sorry about that. It really helped that you tried it out, but
unfortunately all the issues you discovered demonstrated that the "-u
for sbt" feature wasn't quite baked. A lot of users depend on
ScalaTest, so it needs to work.

I built two versions under JDK 1.5, one for Scala 2.8.1 and the other
for Scala 2.9.0. I'll have snapshots out for both of these as soon as
I finish the documentation. I'll leave the snapshots out for a week,
as a kind RC0s, for people to try out while I'll be busy giving a
Scala course. If all goes well I'll release RC1s for these next Friday
(the 13th).

Thanks.

Bill

Reply all
Reply to author
Forward
0 new messages