Corey reports there's trouble with the code on the modelruns branch for
saving and loading runs:

 Corey> I think that a lot of my troubles are coming from my failure to
 Corey> set up my development environment correctly.  I am unable to
 Corey> trace when my code crosses from the org.nlogo.review package
 Corey> (where the UI is) over to the org.nlogo.mirror package (over in
 Corey> the headless jar).

I don't use IntelliJ so we might hit a wall there, but I can have a look
tomorrow...  sometimes just having a second pair of eyes on something
works.

You might consider merging the two source trees (src and headless/src)
back into one, just to make your life easier.  The original purpose of
the split, which doesn't exist on the 5.0.x branch, was to make it
possible to do isolated work on the headless code by itself, to
facilitate Tortoise work.  But what ended up happening instead is that
Tortoise work decamped for the headless branch.  So the subproject split
you've been left to contend with isn't really serving a purpose anymore
on the modelruns branch, other than making build stuff and IDE stuff
more complicated (especially for people who are also familiar with how
things work on the 5.0.x branch, and need knowledge of both setups!).

I was actually planning on suggesting undoing the split anyway.

The mega-commit where the split happened was 65cdcd6 (but I wouldn't
surprised if a trail of fixup commits came after, too).

 Corey> The write-to-disk and/or read-from-disk code appears to be badly
 Corey> broken.

There's some rudimentary testing for the run serializer:

https://github.com/NetLogo/NetLogo/blob/modelruns/headless/src/test/org/nlogo/mirror/SerializerTests.scala

And the serializer actually gets some very heavy testing from these
lines in TestMirroringModels:

https://github.com/NetLogo/NetLogo/blob/c0a5d22d6f1c0c74078e567858596a1f88041129/headless/src/test/org/nlogo/headless/TestMirroringModels.scala#L30-L34

a lot of models (a couple hundred?) get run through this.

So whatever the problem is, presumably it has to do with the code in
ModelRunIO.scala, which there doesn't appear to be any automated testing
for.  If I were you, I'd start by getting some tests in place.

 Corey> The output files have what looks like evil corruption, but I am
 Corey> having trouble getting any useful information in step-through
 Corey> debugging.

One debugging approach to consider: you could try just rewinding back
and forth in Git until you find the commit where it broke.  In my
experience this sometimes makes the cause of a problem obvious that
might have required many hours of hard work to track down the usual way.
(This is one of the many reasons it's good to have a history that's
broken down into lots of bite-sized commits.)

-- 
Seth Tisue | http://tisue.net

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to