cormas / cormas

CORMAS (COmmon pool Ressources and Multi-Agent Simulations)
http://cormas.cirad.fr/indexeng.htm
MIT License
22 stars 22 forks source link

Loading a model generate uncommited changes in CORMAS #445

Open SergeStinckwich opened 3 years ago

SergeStinckwich commented 3 years ago

When loading for example Fire Automata model and you look at Iceberg, CORMAS has uncommitted changes. Parameters/variables names are lost. Parameters and variables names are changed to arg1, arg2, etc and tmp1, tmp2, etc ...

hernanmd commented 3 years ago

Can you detail from which location did you loaded the model? Did you used the Open dialog from the main UI? It could be from Demos or In-image

hernanmd commented 3 years ago

Apparently there is also a regression bug because this was fixed in the Conway model at least: https://github.com/cormas/cormas/commit/0def8d2f190a09498725a7d83618cdfb470d263f

hernanmd commented 3 years ago

This seem to be related with a Pharo bug while file-in previously filed out code: Consider the following code which does not pass the test in Pharo 9:

| rPackage |
" Load an external package first such as NeoJSON "
rPackage := RPackageOrganizer default packageNamed: 'Neo-JSON-Core'.
self deny: rPackage isDirty.
rPackage fileOut.
'Neo-JSON-Core.st' fileIn.
self deny: rPackage isDirty.

I put this on-hold until we have confirmation and PR to the Pharo repository.