On 13 Jul 2017, at 15:00, Thierry Goubier <thierry.goubier@gmail.com> wrote:
Le 13/07/2017 à 11:34, Sven Van Caekenberghe a écrit :
On 13 Jul 2017, at 11:10, Sven Van Caekenberghe <sven@stfx.eu> wrote:
Hi,
Like others I seem to have trouble loading GitHub repositories, in Pharo 4 in my case.
Basically, the following fails:
Metacello new baseline: 'P3'; repository: 'github://svenvc/P3'; load.
But it also fails as dependency when specified like this:
baseline: 'P3' with: [ spec repository: 'github://svenvc/P3' ];
The problem seems to be related to the version info and meta data. (This project was created with Iceberg).
MCFileTreeStCypressReader>>#loadVersionInfo self hasMonticelloMetadata ifTrue: [ ^ info := self extractInfoFrom: (self parseMember: 'version') ]. ...
The test #hasMonticelloMetadata succeeds, but 'version' is not found in /Users/sven/Tmp/pharo4/github-cache/svenvc/P3/master/svenvc-P3-6897866/BaselineOfP3.package/monticello.meta/version
In the above method, there seems to be code to handle missing meta data, but it is not reached.
Is this supposed to work ? Is there a way around this ? I copied the following from a Pharo 6 image to the Pharo 4 image, Thierry's newer version: MCFileTreeAbstractReader>>#hasMonticelloMetadata ^ (self fileUtils filePathExists: 'version' relativeTo: (self fileUtils directoryFromPath: MCFileTreeStCypressWriter monticelloMetaDirName relativeTo: packageDirectory)) or: [ (self fileUtils filePathExists: 'version' relativeTo: packageDirectory) and: [ self fileUtils filePathExists: 'package' relativeTo: packageDirectory ] ] Which does the trick ! (It tests for 'version' explicitly).
Yes, I added that to handle the switch to the Metadata-less format.
Is there a clean way to get this newer code in a 4.0 image ?
Yes. Load FileTree from its repository.
Where does MonticelloFileTree-Core live when not integrated ?
github, where else?
Thanks for the reply. After some trial and error, the simplest way to get your patch in a Pharo 4 image is by doing Metacello new baseline: 'FileTree'; repository: 'github://dalehenrich/filetree:pharo4.0/repository'; load. After that, I can do meta-data-less code loading.
Regards,
Thierry
Thx,
Sven