VoyageMongo with Metacello project spec in Pharo 6 on MacOS Sierra

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

VoyageMongo with Metacello project spec in Pharo 6 on MacOS Sierra

ggiraud
Thanks a lot !

I used your config and now it works.

The result of evaluating 'Smalltalk os’ is 'a MacOSPlatform’, and the VM is 201705310241.

By the way, I find it difficult to fully grasp the Metacello config process.
I have read Deep into Pharo, but I can’t really understand why the modification you suggested works.
Are there other resources available on the subject ?

Bye.

Hi,

On 15 Jul 2017, at 13:46, Guillaume Giraud <[hidden email]> wrote:

Hello,

I placed this code in a baseline of my package:

spec
project: 'VoyageMongo'
with: [ spec
className: #ConfigurationOfVoyageMongo;
version: #stable;
repository: '<a href="github://pharo-nosql/voyage/mc" class="">github://pharo-nosql/voyage/mc';
loads: #('mongo tests') ].

Unfortunately, when I load my Package from Pharo6 on MacOS Sierra I get the following error:

Error: Unsupported OS platform

The first lines of the stack are:

BaselineOfPunQLite(Object) error:
BaselineOfPunQLite platformLibraryName
BaselineOfPunQLite preLoad
MetacelloMCVersionpec(MetacelloSpec) doItBlock:

In detail:

platformLibraryName
" Answer a name for the compiled version of the library "

Smalltalk os isUnix   ifTrue: [ ^ 'unqlite.so' ].
Smalltalk os isWin32  ifTrue: [ ^ 'unqlite.dll' ].
Smalltalk os isMacOSX  ifTrue: [ ^ 'unqlite.dylib' ].

self error: 'Unsupported OS platform?

With Pharo6 on MacOsSierra, ?  Smalltalk os isMacOSX ? return ? false ?. But ?  Smalltalk os isMacOS ? return ? true ?.

What can I do? I just need to load Voyage with the configuration of my package ?

you can just change the Smalltalk os isMacOSX line for Smalltalk os isMacOS for the moment. 
now, that?s very weird :)
What?s the result of evaluating "Smalltalk os? ?
and after executing "OSPlatform startUp: true.? ?
which VM are you using (Smalltalk vm version) ?


and btw, is a lot better to make your config as this: 

spec
baseline: 'Voyage'
with: [ 
spec
repository: '<a href="github://pharo-nosql/voyage:1.5/mc" class="">github://pharo-nosql/voyage:1.5/mc';
loads: #('mongo tests') ].

(referring directly the baseline)


cheers!
Esteban

Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VoyageMongo with Metacello project spec in Pharo 6 on MacOS Sierra

EstebanLM

On 16 Jul 2017, at 15:27, Guillaume Giraud <[hidden email]> wrote:

Thanks a lot !

I used your config and now it works.

The result of evaluating 'Smalltalk os’ is 'a MacOSPlatform’, and the VM is 201705310241.

By the way, I find it difficult to fully grasp the Metacello config process.
I have read Deep into Pharo, but I can’t really understand why the modification you suggested works.
Are there other resources available on the subject ?

yeah, not really much… metacello is hard mostly because dependency management is hard. 
there are some few cases like this, however, that are mostly “accidental complexity” and is because of evolution of the tool.
this is the problem you were seeing: 

configurations (those who starts with “ConfigurationOf”) were made to match older monticello repositories. Then they define versions that points to specific package versions. 
baselines (those who starts with “BaselineOf”) are made to match git and “git like” repositories: there you do not need to define versions because the commit contains all the information you need. That’s defined in the url  "<a href="github://pharo-nosql/voyage:1.5/mc" class="">github://pharo-nosql/voyage:1.5/mc", where the “1.5” part points to the “1.5” release (which is just a git tag).

what happened in your project case is that you where downloading “master” version to load ConfigurationOfVoyageMongo which then was downloading another version of voyage (not master) which was then loading from another, incorrect release (1.4). So it was doing double work. Using directly “baseline:with:” prevents this because downloads just the version you want :)

in general, when in your projects, is recommended to use the “baseline form” when pointing to git based projects and to use configurations just for those that still resides on smalltalkhub or other of the monticello-based repositories.

hope this clarifies :P

cheers!
Esteban



Bye.

Hi,

On 15 Jul 2017, at 13:46, Guillaume Giraud <[hidden email]> wrote:

Hello,

I placed this code in a baseline of my package:

spec
project: 'VoyageMongo'
with: [ spec
className: #ConfigurationOfVoyageMongo;
version: #stable;
repository: '<a href="github://pharo-nosql/voyage/mc" class="">github://pharo-nosql/voyage/mc';
loads: #('mongo tests') ].

Unfortunately, when I load my Package from Pharo6 on MacOS Sierra I get the following error:

Error: Unsupported OS platform

The first lines of the stack are:

BaselineOfPunQLite(Object) error:
BaselineOfPunQLite platformLibraryName
BaselineOfPunQLite preLoad
MetacelloMCVersionpec(MetacelloSpec) doItBlock:

In detail:

platformLibraryName
" Answer a name for the compiled version of the library "

Smalltalk os isUnix   ifTrue: [ ^ 'unqlite.so' ].
Smalltalk os isWin32  ifTrue: [ ^ 'unqlite.dll' ].
Smalltalk os isMacOSX  ifTrue: [ ^ 'unqlite.dylib' ].

self error: 'Unsupported OS platform?

With Pharo6 on MacOsSierra, ?  Smalltalk os isMacOSX ? return ? false ?. But ?  Smalltalk os isMacOS ? return ? true ?.

What can I do? I just need to load Voyage with the configuration of my package ?

you can just change the Smalltalk os isMacOSX line for Smalltalk os isMacOS for the moment. 
now, that?s very weird :)
What?s the result of evaluating "Smalltalk os? ?
and after executing "OSPlatform startUp: true.? ?
which VM are you using (Smalltalk vm version) ?


and btw, is a lot better to make your config as this: 

spec
baseline: 'Voyage'
with: [ 
spec
repository: '<a href="github://pharo-nosql/voyage:1.5/mc" class="">github://pharo-nosql/voyage:1.5/mc';
loads: #('mongo tests') ].

(referring directly the baseline)


cheers!
Esteban

Thanks.

Loading...