SoarGroup / VisualSoar

VisualSoar is a development environment written in Java to aid in the creation of agents for use in Soar
6 stars 6 forks source link

VS reorganizes files for no reason #10

Closed PLatCIC closed 6 months ago

PLatCIC commented 10 months ago
  1. I open a project and open several files to look at their contents. I do not edit anything or save anything. Nevertheless, git shows the comment.dm file as having changed, but says “No content changes found.”
  2. When VS is closed without making or saving any changes, the .vsa file also looks changed to git but with no content changes, and the .dm file has been completely reorganized, for no apparent reason.
johnlaird commented 10 months ago

Next release will have a read-only capability. I was not able to reproduce - opened and closed the agent and none of the dates changed on any files (including .vsa). Is it possible this happened when there was a new version of Visual Soar?

PLatCIC commented 10 months ago

This was not from a new version of VS. In fact, it happened with the VS project John gave me yesterday. Just now I tried it again, opening a project and then opening and closing a bunch of files. For a while, nothing changed. Then, it seems after the first time I opened the while datamap, the comment.dm and the drone-soar.dm~ file had its time stamp changed with no content changes. When I closed the project, without having saved anything, the timestamp on the .dm~ file was changed again, with no content changes. I didn't succeed in getting the .dm file reorganized, but I have seen that happen a number of times in the past. I have also seen the .vsa file reorganized, and on a couple of occasions almost all the operators were deleted from the .vsa file, but not from the .dm file, and I had to rebuild the project. It seems that these errors are hard to reproduce, especially when not saving anything. However, I'm sure they are real.

PLatCIC commented 10 months ago

There is also a strange interaction with the GitHub desktop going on here. When I told GitHub to discard the changes to comment.dm when the only thing that had changed was the time stamp, instead of just discarding the nonexistent changes it deleted the file completely. I restored it and all was OK, but clearly GitHub and VisualSoar don't understand each other very well. This makes it hard to work with a VS project using git.

PLatCIC commented 10 months ago

I just tried to get GitHub to commit the comment.dm file that had no content changes but a new timestamp, but GitHub desktop refused to do it. It says "There are not changes to commit." The first time I tried the file still appeared in the list of changes, but the second it gave me that error and the file disappeared.

amnuxoll commented 6 months ago

I believe this is fixed in this commit: https://github.com/SoarGroup/VisualSoar/commit/6e5b1eef00fff93adc03a14a1c84e47653e74415