Search code examples
pharo

Not able to install `Bloc` packages in Pharo


Wanted to play around with Bloc (basic minimum: create a BlElement), followed the basic instructions to fetch the packages here:

Metacello new
   baseline: 'Bloc';
   repository: 'github://pharo-graphics/Bloc/src';
   load

I see the Fetching... being performed and succeed, and then see the Loading baseline... and Loading Bloc progress bars, but then I get thrown into an error:

This package depends on the following classes:
  Key
You must resolve these dependencies before you will be able to load these definitions: 
  Key>>#a
  Key>>#arrowDown
  Key>>#arrowLeft
  Key>>#arrowRight
  Key>>#arrowUp
  Key>>#b
  Key>>#backspace
  Key>>#c
  Key>>#character:

Any clues?

Update #1: As it turns out, I should have really read the README, which states pretty clearly that the repo is discontinued.

As Leandro pointed out below, the repo relies on classes (such as Key) that were deprecated after 7.0 (and I can verify that the above worked for me in 7.0)

OTOH, the following, recommended at "the new repo" in 8.0, fails for me with the same problem.

Metacello new
        baseline: 'Bloc';
        repository: 'github://feenkcom/Bloc/src';
        load

Update #2:

After loading a fresh version of Pharo 8.0, the Metacello ... load works for me (my previous image was clearly ... put into a bad state by trying to load the older, invalid version, and now I have to figure out how to undo that damage, but that is a problem for another day).

So, all good now, but I hope the Bloc "booklet" is modified to represent these new version constraints.


Solution

  • Not sure whether this helps but the problem is that the class Key belongs to a deprecated package, namely DeprecatedFileStream.

    I was able to load Bloc on Pharo 7.0, where the deprecated classes were still available. Note that in 8.0+ those classes are no longer available.

    I'm not a Pharo user, so I cannot provide you with a solution.