seandenigris / Living-Library

MIT License
4 stars 1 forks source link

Add "Installation" section to README #5

Closed RalfBarkow closed 3 years ago

RalfBarkow commented 3 years ago

Thanks Sean @seandenigris for sharing this! I would like to add a Pharo snippet that shows how to install the Living Library.

seandenigris commented 3 years ago

Thanks! You raised the issue on Discord about conflicts when loading in GToolkit. I'm not fully settled on this point myself.

This is what I do when personally loading on GToolkit:

lockedProjects := #('NeoJSON' 'XMLParser' 'XPath').

[ EpMonitor current disable.
    [ Metacello new
        baseline: baselineName;
        repository: repositoryURL;
        onConflict: [ :ex |
            (lockedProjects includes: ex projectName)
                ifTrue: [ ex useLoaded ]
                ifFalse: [ "Halt now". ex "pass" useLoaded ] ];
        load ] ensure: [ EpMonitor current enable ].
    setupBlock value.
] fork

Another option would be to remove those requirements on GToolkit. However, the Metacello API doesn't make that particularly straightforward, [as I reported on the MetaC ML]():

spec
  for: #( #GToolkit )
  do: [
    spec removeProject: 'OSSubprocess'.
    spec 
        package: 'Tesseract' overrides: [ 
            spec requires: (tesseractBaseDeps copyWithout: 'OSSubprocess') ] ]

Although maybe I'll just bite the bullet and bake it into the baseline now that this is public - might be less work than rampant user failure!

seandenigris commented 3 years ago

Dale explained on the Metacello ML [1] how to create a notGToolkit platform attribute:

You CAN define custom project attributes (see ConfigurationOf>>customProjectAttributes and [1]) ... implement #customAttributes in your BaselineOf and literally define #notGT based upon spelunking in the image at load time.

This is done via bc7b858 and working in 35286d6. So your simplified script should now work and I'll merge this.

  1. https://groups.google.com/g/metacello/c/lps8KmoRzkU/m/OXPWpppEGgAJ