Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to install `Bloc` packages in Pharo

Tags:

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.

like image 895
agam Avatar asked Jan 24 '26 17:01

agam


2 Answers

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.

like image 54
Leandro Caniglia Avatar answered Jan 28 '26 07:01

Leandro Caniglia


That is not the only thing you need. You'll need a different vm and the skia library. It is easier to start with gtoolkit.com to see what you need and how it is built. The vm has some modifications that are not atm in the Pharo vm, for headless usage and no morphic event loop. Skia is used for rendering. In the different github repositories of feenkcom you can find the details. The rendering of bloc to morphic is deprecated.

like image 23
Stephan Eggermont Avatar answered Jan 28 '26 09:01

Stephan Eggermont



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!