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 356 forks source link

Iceberg checkout shows incorrect list of changes #5383

Open akgrant43 opened 4 years ago

akgrant43 commented 4 years ago

Iceberg under some (unknown) conditions will incorrectly construct the list of changes to the system.

Currently this happens when attempting to checkout the v1.5.8 tag of libgit2-pharo-bindings.

To reproduce:

  1. Add the repository in Iceberg (pharo-vcs/libgit2-pharo-bindings)
  2. Inspect the Repository
  3. Checkout the v1.5.8 tag

The preview will look something like the image posted in #development on Discord on Thursday 12 December 2019 (uploading images to github is failing).

Since this is the correct code, the expected result is that the changes list is empty.

A workaround is:

  1. Save the image and exit (so that the repository is defined in iceberg, and it is still on the master branch). 2.:
cd `pharo-local/iceberg/pharo-vcs/libgit2-pharo-bindings/`
git checkout v1.5.8
git checkout -b libgit
cd -
  1. Start pharo again and open Iceberg. At this point the repository will be in 'Detached Working Copy' status.
  2. Select Repair repository, Discard image changes....
  3. Ignore the additions in LibGit-Tests, press Checkout.

At this point the repository will be Up to date.

The issue looks like Iceberg is not recognising that the packages are present / absent.

In the initial load, Iceberg appears to think that LibGit-Core has been removed, when it is actually present. In the repair, Iceberg thinks that it will be loading LibGit-Tests, when it won't be.

OS: Ubuntu 18.04

Image

/dev/shm/p8/Pharo.image Pharo8.0.0 Build information: Pharo-8.0.0+build.1076.sha.f49ba4e3f44e0e6c56bfcaeaf38628b32e3a2504 (64 Bit) Unnamed

Virtual Machine

/dev/shm/p8/pharo-vm/lib/pharo CoInterpreterWithQueueFFI VMMaker-CompatibleUserName.1576136511 uuid: 7fe4520d-ff42-5b35-8fb7-af4cf07830a5 Dec 12 2019 StackToRegisterMappingCogit VMMaker-CompatibleUserName.1576136511 uuid: 7fe4520d-ff42-5b35-8fb7-af4cf07830a5 Dec 12 2019 3ae44dc - Commit: 3ae44dc - Date: 2019-12-12 08:41:51 +0100

akgrant43 commented 4 years ago

Pablo showed his workaround in his techtalk at: https://www.youtube.com/watch?v=-jenQJp5m2U about half way through (the third commit).

The basic sequence is:

  1. Add the repository in Iceberg
  2. Open the checkout dialog from the correct tag / branch (from the Repository window)
  3. IMPORTANT: In the How to checkout: drop-down select DO NOT CHECKOUT any packages....

This will leave the Status in Detached HEAD. The repository can then be repaired and a new branch created from the image commit.

YouTube
Pharo: Contributing To External Projects
Ducasse commented 4 years ago

Guille I added you so that you see this issue. May be we should move it to iceberg.