Aaron,
Thanks for your hard work on this problem! I've made this into a Jira
issue and assigned to Hongbing:
<http://hackydev.ics.hawaii.edu:8080/browse/HACK-563>
Cheers,
Philip
--On Sunday, February 19, 2006 10:51 AM -1000 Aaron Kagawa
<[EMAIL PROTECTED]> wrote:
I'm on the trail of the problem; hunting it down.
Here is an update. It seems that
a) everything works ok, after a restart of Hackystat
b) the error occurs after changing/adding a workspace root.
I don't have a lot of time to explain, but take a look at the following
files.
1)
http://csdl.ics.hawaii.edu/~kagawaa/workspace/broken-before-rootchange.JPG
http://csdl.ics.hawaii.edu/~kagawaa/workspace/broken-rootchange.JPG
http://csdl.ics.hawaii.edu/~kagawaa/workspace/broken-after-rootchange.JPG
here are some screen shots that step you through the process i go through.
2) http://csdl.ics.hawaii.edu/~kagawaa/workspace/akagawa1.zip
If you want to try to duplicate the error, download this zip file. It
contains some fake data that should replicate the problem on your
machine. Remember: a) everything works ok, after a restart of Hackystat
b) the error occurs after changing/adding a workspace root.
3)
http://csdl.ics.hawaii.edu/~kagawaa/workspace/DailyProjectJavaFileMetric.
java http://csdl.ics.hawaii.edu/~kagawaa/workspace/Workspace.java
http://csdl.ics.hawaii.edu/~kagawaa/workspace/WorkspaceCache.java
Here are the java files that I added the printlns to.
4) http://csdl.ics.hawaii.edu/~kagawaa/workspace/broken-log.txt
This is a log of some of the system.out.println's that I used to track
down the problem. I set up these printlns to be able to find out why some
of the workspaces were not being used in the DailyProjectJavaFileMetric
Maps. So, look for
#########################################################
FileMetric analyzing:
D:\java\cruisecontrol-work\checkout\brokenProject\moduleA\java\src\edu\ha
waii\broken\modulea\ passedTrimmedPath: moduleA\,
parentLength: 8
this.root:
D:\java\cruisecontrol-work\checkout\brokenProject\
this.canonicalPath:
D:\java\cruisecontrol-work\checkout\brokenProject\moduleA\java\src\edu\ha
waii\broken\modulea\ trimmedPath:
moduleA\java\src\edu\hawaii\broken\modulea\,
moduleA\java\src\edu\hawaii\broken\modulea\
cutWorkspace: moduleA\
passedTrimmedPath: moduleA\
ACCEPTED
...
FileMetric processing
D:\java\cruisecontrol-work\checkout\brokenProject\moduleA\java\src\edu\ha
waii\broken\modulea\
This indicates that the workspace was added to the map ok and was
processed by the DailyProjectJavaFileMetric to return FileMetrics. This
is associated with
http://csdl.ics.hawaii.edu/~kagawaa/workspace/broken-before-rootchange.JP
G
Then, I changed the workspace root (
http://csdl.ics.hawaii.edu/~kagawaa/workspace/broken-rootchange.JPG)
WorkspaceCache.newWorkspaceRoots:
root:
D:\java\cruisecontrol-work\checkout\
workspace:
D:\java\cruisecontrol-work\checkout\brokenProject\moduleA\java\src\edu\ha
waii\
This shows a wrong root being used for this workspace. It should have
been D:\java\cruisecontrol-work\checkout\brokenProject. Thus, the
workspace won't be used correctly in the DailyProjectJavaFileMetric.
#########################################################
FileMetric analyzing:
D:\java\cruisecontrol-work\checkout\brokenProject\moduleA\java\src\edu\ha
waii\broken\modulea\ passedTrimmedPath: moduleA\,
parentLength: 8
this.root:
D:\java\cruisecontrol-work\checkout\
this.canonicalPath:
D:\java\cruisecontrol-work\checkout\brokenProject\moduleA\java\src\edu\ha
waii\broken\modulea\ trimmedPath:
brokenProject\moduleA\java\src\edu\hawaii\broken\modulea\,
brokenProject\moduleA\java\src\edu\hawaii\broken\modulea\
cutWorkspace: brokenPr
passedTrimmedPath: moduleA\
See.. this workspace wasn't ACCEPTED any more, because the cutWorkspace
and passedTrimmedPath aren't the same anymore (
http://csdl.ics.hawaii.edu/~kagawaa/workspace/broken-after-rootchange.JPG
)
Ok. Sorry that is really cryptic. I don't have time this morning to make
this better.
After all that, I think there is a problem with
WorkspaceCache.newWorkspaceRoots and/or Workspace.isRoot. It would be
really great if someone could turn this into a testdataset and Unit Test
(well, maybe this is a System Test).
thanks, aaron