72 lines
2.9 KiB
Markdown
72 lines
2.9 KiB
Markdown
# ExoRepo
|
|
|
|
ExoRepo provides [syntactic sugar](https://en.wikipedia.org/wiki/Syntactic_sugar) for [Pharo's Iceberg](https://books.pharo.org/booklet-ManageCode/) to support repositories beyond GitLab, GitHub and Bitbucket, starting with Gitea/Forgejo.
|
|
|
|
**IMPORTANT!** This requires the installation of the external open source binary dependency Restify available at:
|
|
|
|
<https://github.com/itzg/restify/>.
|
|
|
|
This should be installed independiently. In Gnu/Linux and Unix alike systems the restify binary is adviced to be instaled under `~/.local/bin`.
|
|
Further versions of ExoRepo will install external dependencies like this one automatically, when they are needed.
|
|
For the rationale behind external binary dependencies look at the **Notes** section in the end of this document.
|
|
## Installation
|
|
|
|
Metacello new
|
|
repository: 'gitea://code.sustrato.red/Offray/VideoWeb';
|
|
baseline: 'VideoWeb';
|
|
fetch
|
|
### from Gitea
|
|
|
|
Run from a playground:
|
|
|
|
```smalltalk
|
|
location := FileLocator gtResource / 'Offray' / 'ExoRepo'.
|
|
(IceRepositoryCreator new
|
|
location: location;
|
|
remote: (IceGitRemote url: 'https://code.sustrato.red/Offray/ExoRepo.git');
|
|
createRepository)
|
|
register.
|
|
|
|
Metacello new
|
|
repository: 'gitlocal://', location fullName;
|
|
baseline: 'ExoRepo';
|
|
load
|
|
```
|
|
|
|
### from GitHub
|
|
|
|
Run from a playground:
|
|
|
|
```smalltalk
|
|
Metacello new
|
|
repository: 'github://offray/ExoRepo/';
|
|
baseline: 'ExoRepo';
|
|
load.
|
|
```
|
|
|
|
## Usage
|
|
|
|
To install the repository <https://code.sustrato.red/Offray/TiddlyWikiPharo> run:
|
|
|
|
```smalltalk
|
|
ExoRepo new
|
|
repository: 'https://code.sustrato.red/Offray/TiddlyWikiPharo';
|
|
load.
|
|
```
|
|
|
|
## Notes
|
|
|
|
**Why to depend on external FLOSS binaries?**
|
|
|
|
While the Pharo ecosystem provides an unmatched development experience,
|
|
some libraries are not available or mature enough in Pharo, despite its vibrant, but small community.
|
|
So, for practical reasons, we have reached already the scenario where we need to rely on external pacakges to provide the functionality we need without developing it ourselves.
|
|
Also, the context where we teach Pharo and Mallable Systems, includes universities with slow or behind proxy connections,
|
|
where dowloading and unziping a single binary is quite faster than resolving packages dependencies and loading them, recursively from the network.
|
|
|
|
In that case, we opted for using self contained external binaries, packaged in a single executable file, derived from Free Libre Open Source Software repositories, written in languages that provide such small self contained binaries, like Nim and Go.
|
|
|
|
For ExoRepo, we rely on Restify, because Gitea repositories don't provide a external JSON API.
|
|
So, [Restify](https://github.com/itzg/restify/) allow us to query Gitea repositories obtaining a JSON response, to leverage on NeoJSON and STON Pharo libraries,
|
|
without implementing cumbersome HTML page parsers
|
|
and adding a single binary was more agile that requiring full HTML parsing capabilites, just to query Gitea repositories. |