Pavel's ChangeLog week of 2018-01-08

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Pavel's ChangeLog week of 2018-01-08

Pavel Krivanek-3
I was continuing on work on Ring 2 integration. The image with
replaced Ring versions can be bootstrapped and most of the failing
tests are fixed. The most problematic part is Epicea adoption. I
improved the optional resolving granularity in Ring 2 and added new
cleaning mechanisms of the environments but some work still left.
In past we had a MethodReference class that was then replaced with
Ring models. With the Ring 2 integration a similar class will be
re-introduced because the models in Ring 2 are more complex and they
are not the best option for cases where only a simple model with a
method class name and selector is needed - e.g. for code coverage etc.
It is important that such reference class will NOT be polymorphic with
real methods because people then tend to mix usage of models and real
system.

Small tip. When you want to work on an image that was created by the
CI from a pull request and you want to make next commits based on it
(it can be a PR done by someone else), you will probably see this
error when you will try to reload packages:

IceError: Your repository seems to be out of sync.!
Please fetch from "noname ([hidden email]:pharo-project/pharo.git)"
and try again.

It is caused by the fact that the versions that are loaded in the
image are based on merging commits done by the CI that are not present
in any repository. Iceberg then cannot find them and so no fetch will
help. It can be solved by reloading of the packages from the Tonel
working copy on disk. Then you can finally reload the packages from
the Git repository. It should not be done in a single pass so that's
why the code looks so strange:


pharoRepository := IceRepository registry detect: [ :each | each name
= 'pharo' ].
repository := TonelRepository new
  directory: (pharoRepository location / pharoRepository subdirectory);
  yourself.
(pharoRepository savedPackages select: [:aPackage | aPackage isLoaded
]) do: [ :package |
  [ (repository loadVersionFromFileNamed: package name) load. ]
    on: MCMergeOrLoadWarning
    do: [:warning | warning resume: true ]].
(pharoRepository savedPackages select: [:aPackage | aPackage isLoaded
]) do: [ :package |
  [ package reload ]
    on: MCMergeOrLoadWarning
    do: [:warning | warning resume: true ]].

Cheers,
-- Pavel