Hi,
Now that we have the infrastructure for downloading and installing star packages from smalltalk.gnu.org, I think it would be nice to have the version number information in the package.xml (and then in the package object). What about adding two tags, one for the major version, one for the minor version and one for the patch version? This would give: maj.min.patch -> 0.8.4 Cheers! Nico _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk signature.asc (205 bytes) Download Attachment |
Now that I think about it, what about a gemcutter like project?
I think it wouldn't be that hard, and I would be willing to work on it. http://gemcutter.org/ I think such a service on projects.smalltalk.gnu.org would be very nice to have. The first thing would be to also add to gst-package the ability to have various remote package repositories. Cheers! Nico _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk signature.asc (205 bytes) Download Attachment |
In reply to this post by Nicolas Petton
Hi,
Here is a simple patch for that. Cheers, Gwen On Thu, 2009-12-10 at 22:57 +0100, Nicolas Petton wrote: > Hi, > > Now that we have the infrastructure for downloading and installing star > packages from smalltalk.gnu.org, I think it would be nice to have the > version number information in the package.xml (and then in the package > object). > > What about adding two tags, one for the major version, one for the minor > version and one for the patch version? > > This would give: maj.min.patch -> 0.8.4 > > Cheers! > > Nico > _______________________________________________ > help-smalltalk mailing list > [hidden email] > http://lists.gnu.org/mailman/listinfo/help-smalltalk _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk package-version.patch (7K) Download Attachment |
Le mercredi 30 décembre 2009 à 23:15 +0100, Gwenael Casaccio a écrit :
> Hi, > > Here is a simple patch for that. yeah! Did I ever tell you that you rock? ;) Paolo, what do you think? Cheers! Nico _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk signature.asc (205 bytes) Download Attachment |
In reply to this post by MrGwen
On 12/30/2009 11:15 PM, Gwenael Casaccio wrote:
> + parseVersion: aString [ > + <category: 'version parsing'> > + > + | tokens | > + (tokens := aString tokenize: '\.') size = 3 ifFalse: [ self error: 'Bad version string : ', aString, ' should be xx.yy.zz' ]. > + self version: (Version major: tokens first asInteger minor: tokens second asInteger patch: tokens third asInteger) > + ] This should: 1) use #subStrings: or alternatively a single regex match ^(\d+)\.(\d+)(?:\.(\d+))$ instead of tokenize. 2) be in Version class>>#fromString: 3) accept a version like 1.0 and change it to 1.0.0 (see regex above). Otherwise looks fine, filtering of prerequisites based on their version can be done later. Paolo _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
In reply to this post by MrGwen
On 12/30/2009 11:15 PM, Gwenael Casaccio wrote:
> - "I tried to put these from the most common to the least common" > - tag = 'file' ifTrue: [self files add: cdata] ifFalse: [ > - tag = 'filein' ifTrue: [self fileIns add: cdata] ifFalse: [ > - tag = 'prereq' ifTrue: [self prerequisites add: cdata] ifFalse: [ > - tag = 'provides' ifTrue: [self features add: cdata] ifFalse: [ > - tag = 'module' ifTrue: [self modules add: cdata] ifFalse: [ > - tag = 'directory' ifTrue: [self relativeDirectory: cdata] ifFalse: [ > - tag = 'name' ifTrue: [self name: cdata] ifFalse: [ > - tag = 'url' ifTrue: [self url: cdata] ifFalse: [ > - tag = 'namespace' ifTrue: [self namespace: cdata] ifFalse: [ > - tag = 'library' ifTrue: [self libraries add: cdata] ifFalse: [ > - tag = 'built-file' ifTrue: [self builtFiles add: cdata] ifFalse: [ > - tag = 'sunit' ifTrue: [self sunitScripts add: cdata] ifFalse: [ > - tag = 'start' ifTrue: [self startScript: cdata] ifFalse: [ > - tag = 'stop' ifTrue: [self stopScript: cdata] ifFalse: [ > - tag = 'callout' ifTrue: [self callouts add: cdata] ifFalse: [ > - tag = openingTag ifTrue: [^self] ifFalse: [ > - self error: 'invalid tag ' , tag]]]]]]]]]]]]]]]]. > + tag = openingTag ifTrue: [ ^ self ]. > + self perform: (self class tags at: tag ifAbsent: [ self error: 'invalid tag ', tag ]) with: cdata. I forgot to say that things like this one embarrass me. :-) Paolo _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
Le jeudi 31 décembre 2009 à 00:56 +0100, Paolo Bonzini a écrit :
> On 12/30/2009 11:15 PM, Gwenael Casaccio wrote: > > - "I tried to put these from the most common to the least common" > > - tag = 'file' ifTrue: [self files add: cdata] ifFalse: [ > > - tag = 'filein' ifTrue: [self fileIns add: cdata] ifFalse: [ > > - tag = 'prereq' ifTrue: [self prerequisites add: cdata] ifFalse: [ > > - tag = 'provides' ifTrue: [self features add: cdata] ifFalse: [ > > - tag = 'module' ifTrue: [self modules add: cdata] ifFalse: [ > > - tag = 'directory' ifTrue: [self relativeDirectory: cdata] ifFalse: [ > > - tag = 'name' ifTrue: [self name: cdata] ifFalse: [ > > - tag = 'url' ifTrue: [self url: cdata] ifFalse: [ > > - tag = 'namespace' ifTrue: [self namespace: cdata] ifFalse: [ > > - tag = 'library' ifTrue: [self libraries add: cdata] ifFalse: [ > > - tag = 'built-file' ifTrue: [self builtFiles add: cdata] ifFalse: [ > > - tag = 'sunit' ifTrue: [self sunitScripts add: cdata] ifFalse: [ > > - tag = 'start' ifTrue: [self startScript: cdata] ifFalse: [ > > - tag = 'stop' ifTrue: [self stopScript: cdata] ifFalse: [ > > - tag = 'callout' ifTrue: [self callouts add: cdata] ifFalse: [ > > - tag = openingTag ifTrue: [^self] ifFalse: [ > > - self error: 'invalid tag ' , tag]]]]]]]]]]]]]]]]. > > + tag = openingTag ifTrue: [ ^ self ]. > > + self perform: (self class tags at: tag ifAbsent: [ self error: 'invalid tag ', tag ]) with: cdata. > > I forgot to say that things like this one embarrass me. :-) too :-p Nico _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk signature.asc (205 bytes) Download Attachment |
On 12/31/2009 03:58 AM, Nicolas Petton wrote:
>> > I forgot to say that things like this one embarrass me.:-) >> > > I agree, but on the other hand the long list of if statements bothers me > too:-P I was referring to someone doing a refactoring that I should have done for years. I have no qualms at all with #perform: done the right way. :-) Paolo _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
In reply to this post by Paolo Bonzini-2
On Thu, 2009-12-31 at 00:55 +0100, Paolo Bonzini wrote:
> On 12/30/2009 11:15 PM, Gwenael Casaccio wrote: > > + parseVersion: aString [ > > + <category: 'version parsing'> > > + > > + | tokens | > > + (tokens := aString tokenize: '\.') size = 3 ifFalse: [ self error: 'Bad version string : ', aString, ' should be xx.yy.zz' ]. > > + self version: (Version major: tokens first asInteger minor: tokens second asInteger patch: tokens third asInteger) > > + ] > > This should: > > 1) use #subStrings: or alternatively a single regex match > > ^(\d+)\.(\d+)(?:\.(\d+))$ > > instead of tokenize. > > 2) be in Version class>>#fromString: > > 3) accept a version like 1.0 and change it to 1.0.0 (see regex above). > > Otherwise looks fine, filtering of prerequisites based on their version > can be done later. > > Paolo Here are the changes. Cheers, Gwen _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk version.patch (1K) Download Attachment |
In reply to this post by Paolo Bonzini-2
On Thu, 2009-12-31 at 00:55 +0100, Paolo Bonzini wrote:
> On 12/30/2009 11:15 PM, Gwenael Casaccio wrote: > > + parseVersion: aString [ > > + <category: 'version parsing'> > > + > > + | tokens | > > + (tokens := aString tokenize: '\.') size = 3 ifFalse: [ self error: 'Bad version string : ', aString, ' should be xx.yy.zz' ]. > > + self version: (Version major: tokens first asInteger minor: tokens second asInteger patch: tokens third asInteger) > > + ] > > This should: > > 1) use #subStrings: or alternatively a single regex match > > ^(\d+)\.(\d+)(?:\.(\d+))$ > > instead of tokenize. > > 2) be in Version class>>#fromString: > > 3) accept a version like 1.0 and change it to 1.0.0 (see regex above). > > Otherwise looks fine, filtering of prerequisites based on their version > can be done later. > > Paolo hmm sorry here is the full patch, Happy new year ! Cheers, Gwen _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk package-version.patch (7K) Download Attachment |
Haven't I pushed it already? :-)
Happy new year, Paolo _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
Free forum by Nabble | Edit this page |