pharo-project / pharo

Pharo is a dynamic reflective pure object-oriented language supporting live programming inspired by Smalltalk.
http://pharo.org
Other
1.21k stars 355 forks source link

Project reloaded after unloading it shows uncommitted changes #10114

Open asampal opened 3 years ago

asampal commented 3 years ago

Bug description I'm seeing some behaviour in Iceberg after unloading and reloading a project which I'm not sure is to be expected. The attached simplified project (just two classes, one for the baseline, one main class) can be used to demonstrate the problem. After loading the project from a local repo, I use the following code to unload both of the added packages:

RPackage organizer unregisterPackageNamed: 'Test-Project'.
RPackage organizer unregisterPackageNamed: 'BaselineOfTestProject'.

The packages seem to properly unload and Iceberg show that they are. If I try to reload them again, the load, but Iceberg shows them as having uncommitted changes and Calypso shows no classes in the packages. Is this expected? Shouldn't the packages cleanly unload such that Iceberg should not show any uncommitted changes after reloading?

To Reproduce Steps to reproduce the behavior:

  1. Load attached project using Iceberg (after initializing git at the root of the expanded archive). Both baseline and main package will be up to date, as displayed in Iceberg.
  2. Unload the packages using the code shown above.
  3. Reload the project again, using Iceberg
  4. Note that the project now shows uncommitted changes

Expected behavior After unloading and then reloading, the project should be up to date as it was after the first load.

Version information:

test-project.zip

welcome[bot] commented 3 years ago

Thanks for opening your first issue! Please check the CONTRIBUTING documents for some tips about which information should be provided. You can find information of how to do a Pull Request here: https://github.com/pharo-project/pharo/wiki/Contribute-a-fix-to-Pharo

GitHub
Contribute a fix to Pharo · pharo-project/pharo Wiki
Pharo is a dynamic reflective pure object-oriented language supporting live programming inspired by Smalltalk. - Contribute a fix to Pharo · pharo-project/pharo Wiki
Ducasse commented 3 years ago

Thanks for your report. We are super busy and we hope to get some times to look at it.

Ducasse commented 3 years ago

Could I ask you if this is also happening in Pharo 10 (probably)?

asampal commented 3 years ago

I'll check it out tonight. I might have noticed that the use of symbols (vs strings) in the baseline class Tonel definition might be related to (cause?) this. I'll try to confirm that as well.

Ducasse commented 3 years ago

Thanks. I think that we should really improve in unloading packages. Now the team here is small. So this is not that we do not want but often we cannot.

asampal commented 3 years ago

I checked and the problem exists even in P10. The other possibility I mentioned is not the cause.

I also verified that if the project is unloaded from Iceberg (and not using the RPackage code, the project unloads cleanly and can be subsequently reloaded without showing uncommitted changes.