Storing metadata along with .mcz packages
Hi there, I need to store a sort of a metadata along with the code in the .mcz. The goal is that if such a package is loaded by standard Pharo 2.0 (or 3.0) image, modified and then saved back as a new version, these metadata will be somehow preserved. Is that at all possible? If so, how? Best, Jan
Hi Jan, I would say that you have to plug in to the MCVersionInfo and add another field (most probably with a dict) keeping all the additional metadata. That means you would also have to adapt the MCMczReader and MCMczWriter to take the additional data into account. - MCMczReader >> #loadVersionInfo - MczWriter >> #writeVersionInfo: I would suggest to store the metadata as fueled objects, that way you do not have to write in the monticello serialized "lisp" format ;) Even with the additional "files" present in the zip/mcz these versions will load without a problem in non-changed images. On 2013-05-29, at 02:01, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:
Hi there,
I need to store a sort of a metadata along with the code in the .mcz. The goal is that if such a package is loaded by standard Pharo 2.0 (or 3.0) image, modified and then saved back as a new version, these metadata will be somehow preserved.
Is that at all possible? If so, how?
Best, Jan
On 29/05/13 06:50, Camillo Bruni wrote:
Hi Jan,
I would say that you have to plug in to the MCVersionInfo and add another field (most probably with a dict) keeping all the additional metadata.
That means you would also have to adapt the MCMczReader and MCMczWriter to take the additional data into account. - MCMczReader >> #loadVersionInfo - MczWriter >> #writeVersionInfo:
I would suggest to store the metadata as fueled objects, that way you do not have to write in the monticello serialized "lisp" format ;)
Even with the additional "files" present in the zip/mcz these versions will load without a problem in non-changed images.
Yes, additional files are not of a problem while loading. Problem is that they are not preserved, so when I open the package in unmodified pharo and save it again, all extra files are gone. That's no-go for me :-) Jan
On 2013-05-29, at 02:01, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:
Hi there,
I need to store a sort of a metadata along with the code in the .mcz. The goal is that if such a package is loaded by standard Pharo 2.0 (or 3.0) image, modified and then saved back as a new version, these metadata will be somehow preserved.
Is that at all possible? If so, how?
Best, Jan
On May 29, 2013, at 2:01 AM, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:
Hi there,
I need to store a sort of a metadata along with the code in the .mcz. The goal is that if such a package is loaded by standard Pharo 2.0 (or 3.0) image, modified and then saved back as a new version, these metadata will be somehow preserved.
Is that at all possible? If so, how?
Yes :) Now packages have manifest created lazily by the smalllint browser. We are starting to store smallint rule false positive there and soon per package license.
Best, Jan
On 29/05/13 06:53, stephane ducasse wrote:
On May 29, 2013, at 2:01 AM, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:
Hi there,
I need to store a sort of a metadata along with the code in the .mcz. The goal is that if such a package is loaded by standard Pharo 2.0 (or 3.0) image, modified and then saved back as a new version, these metadata will be somehow preserved.
Is that at all possible? If so, how?
Yes :) Now packages have manifest created lazily by the smalllint browser. We are starting to store smallint rule false positive there and soon per package license.
Good, Where should I look to see it how to do it? Jan
Best, Jan
On 2013-05-29, at 10:45, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:
On 29/05/13 06:53, stephane ducasse wrote:
On May 29, 2013, at 2:01 AM, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:
Hi there,
I need to store a sort of a metadata along with the code in the .mcz. The goal is that if such a package is loaded by standard Pharo 2.0 (or 3.0) image, modified and then saved back as a new version, these metadata will be somehow preserved.
Is that at all possible? If so, how?
Yes :) Now packages have manifest created lazily by the smalllint browser. We are starting to store smallint rule false positive there and soon per package license.
Good, Where should I look to see it how to do it?
It "just" stores classes with data in strings in methods...
On 29/05/13 10:29, Camillo Bruni wrote:
On 2013-05-29, at 10:45, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:
On 29/05/13 06:53, stephane ducasse wrote:
On May 29, 2013, at 2:01 AM, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:
Hi there,
I need to store a sort of a metadata along with the code in the .mcz. The goal is that if such a package is loaded by standard Pharo 2.0 (or 3.0) image, modified and then saved back as a new version, these metadata will be somehow preserved.
Is that at all possible? If so, how?
Yes :) Now packages have manifest created lazily by the smalllint browser. We are starting to store smallint rule false positive there and soon per package license.
Good, Where should I look to see it how to do it?
It "just" stores classes with data in strings in methods...
:-) What was may "plan B", actually. OK, I'll go that way.
participants (3)
-
Camillo Bruni -
Jan Vrany -
stephane ducasse