Baseline question

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

Baseline question

Stephane Ducasse-3
Hi

I 'm trying to define a baseline for our project and I defined it as

baseline: spec
   <baseline>
   spec for: #common do: [ spec
        baseline: 'SmaCC' with: [ spec
        repository: 'github://ThierryGoubier/SmaCC';
        loads: 'SmaCC-GLR-Runtime' ];

        package: 'SmaCC-Solidity'
"we could say that SmaccSolidity depends on Smacc-Runtime but I do not
know how to say it"
]

Now I thought that I could try to load it using the following

Metacello new
    baseline: 'SmaccSolidity';
    repository: 'github://RMODINRIA-Blockchain/SmaCC-Solidity';
    load.


But I get an error telling me that the baseline constructor does not
understand load ;(

I read the blog of peter
https://www.peteruhnak.com/blog/2016/07/25/how-to-use-git-and-github-with-pharo/

and I'm doing exactly the same so I wonder.

Stef

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

Re: Baseline question

Julien Delplanque
Hello,

To do my baselines I do the following:

1. I create a subclass of BaselineOf.

2. I create an instance method #baseline:

baseline: spec
     <baseline>
     spec
         for: #common
         do: [
             self
                 defineDependencies: spec;
                 definePackages: spec ]

3. I create the #defineDependencies: instance method (for example in
SFDiff):

defineDependencies: spec
     ^ spec
         project: 'ChangeModel' with: [
             spec
                 className: 'ConfigurationOfFamixDiff';
                 version: #development;
                 repository:
'http://smalltalkhub.com/mc/Moose/FamixDiff/main';
                 loads: 'ChangeModel' ];
         project: 'FamixDiff' with: [
             spec
                 className: 'ConfigurationOfFamixDiff';
                 version: #development;
                 repository:
'http://smalltalkhub.com/mc/Moose/FamixDiff/main';
                 loads: 'Core' ];
         yourself

4. I create the #definePackages: instance method (still for SFDiff):

definePackages: spec
     ^ spec
         package: 'SimilarityFlooding' with: [ spec requires:
#('ChangeModel') ];
         package: 'SimilarityFlooding-Tests' with: [ spec requires:
#('SimilarityFlooding') ];
         package: 'SimilarityFlooding-Diff' with: [ spec requires:
#('SimilarityFlooding') ];
         package: 'SimilarityFlooding-Diff-Tests' with: [ spec requires:
#('SimilarityFlooding-Diff') ];
         package: 'SimilarityFlooding-Evaluator' with: [ spec requires:
#('SimilarityFlooding' 'FamixDiff') ];
         package: 'SimilarityFlooding-DiffOrion' with: [ spec requires:
#('SimilarityFlooding-Diff') ];
         yourself

Separating the dependencies and package definitions allow me to modify
it easily.

I hope it helps.

Julien

PS: to make a baseline use on another baseline as dependency I put this
kind of source code in #defineDependencies:

spec baseline: 'DependenceName' with: [
     spec repository: 'github://user/repositoryname/eventualdirectory' ].


On 01/07/17 14:35, Stephane Ducasse wrote:

> Hi
>
> I 'm trying to define a baseline for our project and I defined it as
>
> baseline: spec
>     <baseline>
>     spec for: #common do: [ spec
>          baseline: 'SmaCC' with: [ spec
>          repository: 'github://ThierryGoubier/SmaCC';
>          loads: 'SmaCC-GLR-Runtime' ];
>
>          package: 'SmaCC-Solidity'
> "we could say that SmaccSolidity depends on Smacc-Runtime but I do not
> know how to say it"
> ]
>
> Now I thought that I could try to load it using the following
>
> Metacello new
>      baseline: 'SmaccSolidity';
>      repository: 'github://RMODINRIA-Blockchain/SmaCC-Solidity';
>      load.
>
>
> But I get an error telling me that the baseline constructor does not
> understand load ;(
>
> I read the blog of peter
> https://www.peteruhnak.com/blog/2016/07/25/how-to-use-git-and-github-with-pharo/
>
> and I'm doing exactly the same so I wonder.
>
> Stef
>


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

Re: Baseline question

Peter Uhnak
In reply to this post by Stephane Ducasse-3
On Sat, Jul 01, 2017 at 02:35:07PM +0200, Stephane Ducasse wrote:

> Hi
>
> I 'm trying to define a baseline for our project and I defined it as
>
> baseline: spec
>    <baseline>
>    spec for: #common do: [ spec
>         baseline: 'SmaCC' with: [ spec
>         repository: 'github://ThierryGoubier/SmaCC';
>         loads: 'SmaCC-GLR-Runtime' ];
>
>         package: 'SmaCC-Solidity'
> "we could say that SmaccSolidity depends on Smacc-Runtime but I do not
> know how to say it"
> ]
>
> Now I thought that I could try to load it using the following
>
> Metacello new
>     baseline: 'SmaccSolidity';
>     repository: 'github://RMODINRIA-Blockchain/SmaCC-Solidity';
>     load.
>
>
> But I get an error telling me that the baseline constructor does not
> understand load ;(

It loaded ok for me in a fresh image (pharo 6), maybe local problem?

As for dependency on a package, here's an older answer by Thierry: http://forum.world.st/How-to-depend-on-another-Github-repo-from-the-baseline-tp4812546p4812551.html

Peter

Loading...