updating project structure

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

updating project structure

Mariano Martinez Peck
Hi Dale. The chapter says:

-----
\subsection{Update Project Structure}

In the course of development it is sometimes necessary to add a new package or project. In this case let's add a package to the project called 'GemTools-Overrides' ('GemTools-Overrides' is actually part of the GemTools project already and we just left it out of the previous example). To add a new package to a project you need to:

\begin{itemize}
\item (1) create a new baseline version to reflect the new package and dependencies,
\item (2) update existing \ct{#development} version to reference the new baseline version, and
\item (3) include the explicit version for the new package.
\end{itemize}

You can do that manually by using a class browser to manually
copy and edit the old baseline version to reflect the new structure
edit the existing \ct{#development} version method.
You can also use the Metacello Toolbox API (not finished/tested yet):

\begin{code}{}
| toolbox |
toolbox := MetacelloToolBox configurationNamed: 'GemToolsExample'.
toolbox
  createVersionMethod: 'baseline11:' inCategory: 'baselines' forVersion: '1.1-baseline';
  addSectionsFrom: '1.0-baseline'
     forBaseline: true
     updateProjects: false
     updatePackages: false
     versionSpecsDo: [ :attribute :versionSpec |
        attribute == #common
          ifTrue: [ versionSpec packages add: (toolbox createPackageSpec: 'GemTools-Overrides') ].
        true ];
  commitMethod;
  modifyVersionMethodForVersion: '1.1'
     versionSpecsDo: [ :attribute :versionSpec |
        attribute == #common
          ifTrue: [ versionSpec packages add: (toolbox createPackageSpec: 'GemTools-Overrides') ].
        false ];
  commitMethod.
\end{code}


------

My question is about the line: "You can also use the Metacello Toolbox API (not finished/tested yet):"
Has it already been finished/tested?  I wonder if I can remove this from the chapter or not...

thanks in advance!


--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: updating project structure

Dale Henrichs
Mariano,

The comment can be removed ... there are tests in place for  the Metacello ToolBox API, which wasn't the case when that section was written...

'finished' is another matterthat I don't think we need to comment on:)

Dale
----- Original Message -----
| From: "Mariano Martinez Peck" <[hidden email]>
| To: [hidden email]
| Sent: Sunday, December 11, 2011 7:06:15 AM
| Subject: [Metacello] updating project structure
|
| Hi Dale. The chapter says:
|
| -----
| \subsection{Update Project Structure}
|
| In the course of development it is sometimes necessary to add a new
| package or project. In this case let's add a package to the project
| called 'GemTools-Overrides' ('GemTools-Overrides' is actually part
| of the GemTools project already and we just left it out of the
| previous example). To add a new package to a project you need to:
|
| \begin{itemize}
| \item (1) create a new baseline version to reflect the new package
| and dependencies,
| \item (2) update existing \ct{#development} version to reference the
| new baseline version, and
| \item (3) include the explicit version for the new package.
| \end{itemize}
|
| You can do that manually by using a class browser to manually
| copy and edit the old baseline version to reflect the new structure
| edit the existing \ct{#development} version method.
| You can also use the Metacello Toolbox API (not finished/tested yet):
|
| \begin{code}{}
| | toolbox |
| toolbox := MetacelloToolBox configurationNamed: 'GemToolsExample'.
| toolbox
| createVersionMethod: 'baseline11:' inCategory: 'baselines'
| forVersion: '1.1-baseline';
| addSectionsFrom: '1.0-baseline'
| forBaseline: true
| updateProjects: false
| updatePackages: false
| versionSpecsDo: [ :attribute :versionSpec |
| attribute == #common
| ifTrue: [ versionSpec packages add: (toolbox createPackageSpec:
| 'GemTools-Overrides') ].
| true ];
| commitMethod;
| modifyVersionMethodForVersion: '1.1'
| versionSpecsDo: [ :attribute :versionSpec |
| attribute == #common
| ifTrue: [ versionSpec packages add: (toolbox createPackageSpec:
| 'GemTools-Overrides') ].
| false ];
| commitMethod.
| \end{code}
|
|
| ------
|
| My question is about the line: " You can also use the Metacello
| Toolbox API (not finished/tested yet): "
| Has it already been finished/tested? I wonder if I can remove this
| from the chapter or not...
|
| thanks in advance!
|
|
| --
| Mariano
| http://marianopeck.wordpress.com
|
|
Reply | Threaded
Open this post in threaded view
|

Re: updating project structure

Mariano Martinez Peck
THanks Dale, I have just fix it.

On Mon, Dec 12, 2011 at 6:19 PM, Dale Henrichs <[hidden email]> wrote:
Mariano,

The comment can be removed ... there are tests in place for  the Metacello ToolBox API, which wasn't the case when that section was written...

'finished' is another matterthat I don't think we need to comment on:)

Dale
----- Original Message -----
| From: "Mariano Martinez Peck" <[hidden email]>
| To: [hidden email]
| Sent: Sunday, December 11, 2011 7:06:15 AM
| Subject: [Metacello] updating project structure
|
| Hi Dale. The chapter says:
|
| -----
| \subsection{Update Project Structure}
|
| In the course of development it is sometimes necessary to add a new
| package or project. In this case let's add a package to the project
| called 'GemTools-Overrides' ('GemTools-Overrides' is actually part
| of the GemTools project already and we just left it out of the
| previous example). To add a new package to a project you need to:
|
| \begin{itemize}
| \item (1) create a new baseline version to reflect the new package
| and dependencies,
| \item (2) update existing \ct{#development} version to reference the
| new baseline version, and
| \item (3) include the explicit version for the new package.
| \end{itemize}
|
| You can do that manually by using a class browser to manually
| copy and edit the old baseline version to reflect the new structure
| edit the existing \ct{#development} version method.
| You can also use the Metacello Toolbox API (not finished/tested yet):
|
| \begin{code}{}
| | toolbox |
| toolbox := MetacelloToolBox configurationNamed: 'GemToolsExample'.
| toolbox
| createVersionMethod: 'baseline11:' inCategory: 'baselines'
| forVersion: '1.1-baseline';
| addSectionsFrom: '1.0-baseline'
| forBaseline: true
| updateProjects: false
| updatePackages: false
| versionSpecsDo: [ :attribute :versionSpec |
| attribute == #common
| ifTrue: [ versionSpec packages add: (toolbox createPackageSpec:
| 'GemTools-Overrides') ].
| true ];
| commitMethod;
| modifyVersionMethodForVersion: '1.1'
| versionSpecsDo: [ :attribute :versionSpec |
| attribute == #common
| ifTrue: [ versionSpec packages add: (toolbox createPackageSpec:
| 'GemTools-Overrides') ].
| false ];
| commitMethod.
| \end{code}
|
|
| ------
|
| My question is about the line: " You can also use the Metacello
| Toolbox API (not finished/tested yet): "
| Has it already been finished/tested? I wonder if I can remove this
| from the chapter or not...
|
| thanks in advance!
|
|
| --
| Mariano
| http://marianopeck.wordpress.com
|
|



--
Mariano
http://marianopeck.wordpress.com