Metacello / metacello

Metacello is a package management system for Smalltalk
MIT License
87 stars 43 forks source link

[QUESTION] How to load Monticello package via Metacello Scripting API? #538

Closed LinqLover closed 3 years ago

LinqLover commented 3 years ago

The solution must be obvious but I'm just failing to find it: In my baseline, I specified the following dependency, inter alia:

spec package: 'JSON' with: [
    spec repository: 'https://www.squeaksource.com/PostgresV3'].

Which works well so far. However, for experimental purposes, I'm trying to download the same package manually using the scripting API, but I don't know how to do this:

Metacello new
    project: 'JSON';
    repository: 'https://www.squeaksource.com/PostgresV3';
    get.
"Error: className field required"

Metacello new
    project: 'JSON';
    className: 'Json';
    repository: 'https://www.squeaksource.com/PostgresV3';
    get.
"This one actually fetches the JSON project, but then fails because Json obviously is not a configuration class."

Which selector(s) do I need to set in order to load a configuration-less project using the Scripting API?

Thanks in advance.

krono commented 3 years ago

https://www.squeaksource.com/PostgresV3 Is a plain Monticello repository. You cannot use the metacello Scripting API to fetch from it, since it is, from Metacellos Point of View, more lowlevel.

In Squeak just do:

(Installer squeaksource: 'PostgresV3')
    addPackage: 'Json';
    install.
LinqLover commented 3 years ago

Thanks for the explanation!

Actually, I was searching for other kinds of repositories (besides git) that Metacello can load, in order to figure out how #536 can be extended to specify credentials for entire dependency trees (so SqueakSource was only one example). However, are there any other repository types that support credentials at all? What about FTP, why doesn't Metacello[Squeak]Platform >> extractTypeFromDescription: check for HTTP but for FTP? :-)