a problem with metacello and branches

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

a problem with metacello and branches

EstebanLM
Hi Dale,

I have a problem in my ConfigurationOfCog due to the use of monticello branches in a couple of packages.
Basically, I have this package declaration:

                        package: 'VMMaker.oscog' with: [
                                spec requires: #('SharedPool-Speech' 'FFI-Pools' 'Balloon-Engine-Pools' 'Sound' 'Alien-Core') ];

and problem is because metacello takes 'VMMaker.oscog' as a plain name while it actually is a name + branch for monticello, then when you check for available packages it does not find anything.
I made a simple fix that looks like working fine:

MetacelloPackageSpec>>#goferLoaderReference
        ^ file == nil
                ifTrue: [
                        (self name includes: $.)
                                ifTrue: [ self goferLoaderReferenceWithBranch ]
                                ifFalse: [ GoferPackageReference name: self name ] ]
                ifFalse: [
                        "does Monticello-style #versionInfoFromVersionNamed: matching"
                        MetacelloGoferPackage name: self name packageFilename: self file ]


MetacelloPackageSpec>>#goferLoaderReferenceWithBranch
        | packageName branch |

        packageName := self name copyUpToLast: $..
        branch := self name copyAfterLast: $..
        ^ GoferConstraintReference
                name: packageName
                constraint: [ :reference | reference branch = branch ]

as I said... looks working fine, but I would like to validate it before pushing it :(

Esteban

--
You received this message because you are subscribed to the Google Groups "Metacello" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: a problem with metacello and branches

Dale Henrichs-3
Esteban,

When you are using monticello branches you should specify the package like this:

  package: 'VMMaker' with: [
    spec 
      file: 'VMMaker.oscog';
      requires: #('SharedPool-Speech' 'FFI-Pools' 'Balloon-Engine-Pools' 'Sound' 'Alien-Core') ]

The arg to the package: method is the package name ... the file: arg specifies the base file name .... this all has to do with the way that branches are really just different file names in Monticello ... Monticello doesn't know about branch names it's just a file naming convention ... internally Monticello has a package name and all of the object state in the image is based on the package name ... the package name is VMMaker and it needs to be specified as well ... of course in Monticello it is possible to name your package  'VMMaker.oscog', but that I would think that all hell would break loose:)

Dale


On Tue, Jun 10, 2014 at 6:08 AM, Esteban Lorenzano <[hidden email]> wrote:
Hi Dale,

I have a problem in my ConfigurationOfCog due to the use of monticello branches in a couple of packages.
Basically, I have this package declaration:

                        package: 'VMMaker.oscog' with: [
                                spec requires: #('SharedPool-Speech' 'FFI-Pools' 'Balloon-Engine-Pools' 'Sound' 'Alien-Core') ];

and problem is because metacello takes ‘VMMaker.oscog’ as a plain name while it actually is a name + branch for monticello, then when you check for available packages it does not find anything.
I made a simple fix that looks like working fine:

MetacelloPackageSpec>>#goferLoaderReference
        ^ file == nil
                ifTrue: [
                        (self name includes: $.)
                                ifTrue: [ self goferLoaderReferenceWithBranch ]
                                ifFalse: [ GoferPackageReference name: self name ] ]
                ifFalse: [
                        "does Monticello-style #versionInfoFromVersionNamed: matching"
                        MetacelloGoferPackage name: self name packageFilename: self file ]


MetacelloPackageSpec>>#goferLoaderReferenceWithBranch
        | packageName branch |

        packageName := self name copyUpToLast: $..
        branch := self name copyAfterLast: $..
        ^ GoferConstraintReference
                name: packageName
                constraint: [ :reference | reference branch = branch ]

as I said… looks working fine, but I would like to validate it before pushing it :(

Esteban

--
You received this message because you are subscribed to the Google Groups "Metacello" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: a problem with metacello and branches

EstebanLM
cool, I didn’t know that. 
fixing my configuration then

thanks!
Esteban

On 10 Jun 2014, at 10:19, Dale Henrichs <[hidden email]> wrote:

Esteban,

When you are using monticello branches you should specify the package like this:

  package: 'VMMaker' with: [
    spec 
      file: 'VMMaker.oscog';
      requires: #('SharedPool-Speech' 'FFI-Pools' 'Balloon-Engine-Pools' 'Sound' 'Alien-Core') ]

The arg to the package: method is the package name ... the file: arg specifies the base file name .... this all has to do with the way that branches are really just different file names in Monticello ... Monticello doesn't know about branch names it's just a file naming convention ... internally Monticello has a package name and all of the object state in the image is based on the package name ... the package name is VMMaker and it needs to be specified as well ... of course in Monticello it is possible to name your package  'VMMaker.oscog', but that I would think that all hell would break loose:)

Dale


On Tue, Jun 10, 2014 at 6:08 AM, Esteban Lorenzano <[hidden email]> wrote:
Hi Dale,

I have a problem in my ConfigurationOfCog due to the use of monticello branches in a couple of packages.
Basically, I have this package declaration:

                        package: 'VMMaker.oscog' with: [
                                spec requires: #('SharedPool-Speech' 'FFI-Pools' 'Balloon-Engine-Pools' 'Sound' 'Alien-Core') ];

and problem is because metacello takes ‘VMMaker.oscog’ as a plain name while it actually is a name + branch for monticello, then when you check for available packages it does not find anything.
I made a simple fix that looks like working fine:

MetacelloPackageSpec>>#goferLoaderReference
        ^ file == nil
                ifTrue: [
                        (self name includes: $.)
                                ifTrue: [ self goferLoaderReferenceWithBranch ]
                                ifFalse: [ GoferPackageReference name: self name ] ]
                ifFalse: [
                        "does Monticello-style #versionInfoFromVersionNamed: matching"
                        MetacelloGoferPackage name: self name packageFilename: self file ]


MetacelloPackageSpec>>#goferLoaderReferenceWithBranch
        | packageName branch |

        packageName := self name copyUpToLast: $..
        branch := self name copyAfterLast: $..
        ^ GoferConstraintReference
                name: packageName
                constraint: [ :reference | reference branch = branch ]

as I said… looks working fine, but I would like to validate it before pushing it :(

Esteban


--
You received this message because you are subscribed to the Google Groups "Metacello" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: a problem with metacello and branches

Dale Henrichs-3
Yeah, not a lot of people use Monticello branches:)

Dale


On Tue, Jun 10, 2014 at 6:24 AM, Esteban Lorenzano <[hidden email]> wrote:
cool, I didn’t know that. 
fixing my configuration then

thanks!
Esteban

On 10 Jun 2014, at 10:19, Dale Henrichs <[hidden email]> wrote:

Esteban,

When you are using monticello branches you should specify the package like this:

  package: 'VMMaker' with: [
    spec 
      file: 'VMMaker.oscog';
      requires: #('SharedPool-Speech' 'FFI-Pools' 'Balloon-Engine-Pools' 'Sound' 'Alien-Core') ]

The arg to the package: method is the package name ... the file: arg specifies the base file name .... this all has to do with the way that branches are really just different file names in Monticello ... Monticello doesn't know about branch names it's just a file naming convention ... internally Monticello has a package name and all of the object state in the image is based on the package name ... the package name is VMMaker and it needs to be specified as well ... of course in Monticello it is possible to name your package  'VMMaker.oscog', but that I would think that all hell would break loose:)

Dale


On Tue, Jun 10, 2014 at 6:08 AM, Esteban Lorenzano <[hidden email]> wrote:
Hi Dale,

I have a problem in my ConfigurationOfCog due to the use of monticello branches in a couple of packages.
Basically, I have this package declaration:

                        package: 'VMMaker.oscog' with: [
                                spec requires: #('SharedPool-Speech' 'FFI-Pools' 'Balloon-Engine-Pools' 'Sound' 'Alien-Core') ];

and problem is because metacello takes ‘VMMaker.oscog’ as a plain name while it actually is a name + branch for monticello, then when you check for available packages it does not find anything.
I made a simple fix that looks like working fine:

MetacelloPackageSpec>>#goferLoaderReference
        ^ file == nil
                ifTrue: [
                        (self name includes: $.)
                                ifTrue: [ self goferLoaderReferenceWithBranch ]
                                ifFalse: [ GoferPackageReference name: self name ] ]
                ifFalse: [
                        "does Monticello-style #versionInfoFromVersionNamed: matching"
                        MetacelloGoferPackage name: self name packageFilename: self file ]


MetacelloPackageSpec>>#goferLoaderReferenceWithBranch
        | packageName branch |

        packageName := self name copyUpToLast: $..
        branch := self name copyAfterLast: $..
        ^ GoferConstraintReference
                name: packageName
                constraint: [ :reference | reference branch = branch ]

as I said… looks working fine, but I would like to validate it before pushing it :(

Esteban



--
You received this message because you are subscribed to the Google Groups "Metacello" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.