Discussion:
[squeak-dev] The Inbox: Installer-Core-dtl.425.mcz
c***@source.squeak.org
0000-11-09 08:15:38 UTC
Permalink
A new version of Installer-Core was added to project The Inbox:
http://source.squeak.org/inbox/Installer-Core-dtl.425.mcz

==================== Summary ====================

Name: Installer-Core-dtl.425
Author: dtl
Time: 7 November 2018, 9:24:32.82223 pm
UUID: 6a5d8822-147f-460a-9aac-b17f02399538
Ancestors: Installer-Core-cmm.424

In the case of a repository containing both 'Chronology-Core-dtl.3' and
'Chronology-Core-dtl.30', the following will incorrectly load version 30 rather
than version 3.

(Installer ss project: 'UTCDateAndTime') install: 'Chronology-Core-dtl.3'

A workaround is to reverse the order of sorting in InstallerMonticello>>mcSortFileBlock, such that 'Chronology-Core-dtl.3' will be detected before 'Chronology-Core-dtl.30' in InstallerMonticello>>mcThing.

A possibly better fix is to change InstallerMonticello>>mcDetectFileBlock: to do string equality checks rather than #beginsWith: comparisons. This appears to be correct, but might have side effects, since I do not know the original rationale for using #beginsWith:.

This change implements the possibly better fix.

=============== Diff against Installer-Core-cmm.424 ===============

Item was changed:
----- Method: InstallerMonticello>>mcDetectFileBlock: (in category 'monticello') -----
mcDetectFileBlock: pkg

pkg isString ifTrue: [ ^ [ :aMCVersionName |
+ (pkg beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName = pkg ] ] ].
- (pkg beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: pkg ] ] ].

(pkg isKindOf: Array)
ifTrue: [ ^ [ :aMCVersionName | pkg anySatisfy: [ :item |
+ (item beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName = item ] ] ] ].
- (item beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: item ] ] ] ].

pkg isBlock ifTrue: [
Tobias Pape
2018-11-08 07:55:06 UTC
Permalink
Post by c***@source.squeak.org
http://source.squeak.org/inbox/Installer-Core-dtl.425.mcz
==================== Summary ====================
Name: Installer-Core-dtl.425
Author: dtl
Time: 7 November 2018, 9:24:32.82223 pm
UUID: 6a5d8822-147f-460a-9aac-b17f02399538
Ancestors: Installer-Core-cmm.424
In the case of a repository containing both 'Chronology-Core-dtl.3' and
'Chronology-Core-dtl.30', the following will incorrectly load version 30 rather
than version 3.
(Installer ss project: 'UTCDateAndTime') install: 'Chronology-Core-dtl.3'
A workaround is to reverse the order of sorting in InstallerMonticello>>mcSortFileBlock, such that 'Chronology-Core-dtl.3' will be detected before 'Chronology-Core-dtl.30' in InstallerMonticello>>mcThing.
A possibly better fix is to change InstallerMonticello>>mcDetectFileBlock: to do string equality checks rather than #beginsWith: comparisons. This appears to be correct, but might have side effects, since I do not know the original rationale for using #beginsWith:.
Isn't the rationale that you cat do

Installer squeaksource
project: 'UTCDateAndTime';
install: 'Chronology-Core'.

and get just the latest one ?

Best regards
-Tobias
Post by c***@source.squeak.org
This change implements the possibly better fix.
=============== Diff against Installer-Core-cmm.424 ===============
----- Method: InstallerMonticello>>mcDetectFileBlock: (in category 'monticello') -----
mcDetectFileBlock: pkg
pkg isString ifTrue: [ ^ [ :aMCVersionName |
+ (pkg beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName = pkg ] ] ].
- (pkg beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: pkg ] ] ].
(pkg isKindOf: Array)
ifTrue: [ ^ [ :aMCVersionName | pkg anySatisfy: [ :item |
+ (item beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName = item ] ] ] ].
- (item beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: item ] ] ] ].
pkg
David T. Lewis
2018-11-08 12:27:22 UTC
Permalink
Post by Tobias Pape
Post by c***@source.squeak.org
http://source.squeak.org/inbox/Installer-Core-dtl.425.mcz
==================== Summary ====================
Name: Installer-Core-dtl.425
Author: dtl
Time: 7 November 2018, 9:24:32.82223 pm
UUID: 6a5d8822-147f-460a-9aac-b17f02399538
Ancestors: Installer-Core-cmm.424
In the case of a repository containing both 'Chronology-Core-dtl.3' and
'Chronology-Core-dtl.30', the following will incorrectly load version 30 rather
than version 3.
(Installer ss project: 'UTCDateAndTime') install: 'Chronology-Core-dtl.3'
A workaround is to reverse the order of sorting in InstallerMonticello>>mcSortFileBlock, such that 'Chronology-Core-dtl.3' will be detected before 'Chronology-Core-dtl.30' in InstallerMonticello>>mcThing.
A possibly better fix is to change InstallerMonticello>>mcDetectFileBlock: to do string equality checks rather than #beginsWith: comparisons. This appears to be correct, but might have side effects, since I do not know the original rationale for using #beginsWith:.
Isn't the rationale that you cat do
Installer squeaksource
project: 'UTCDateAndTime';
install: 'Chronology-Core'.
and get just the latest one ?
Ah yes of course. So this proposed fix is wrong.

We still do need a way for an explicit version to be loaded reliably. hmmm...

Dave
Post by Tobias Pape
Best regards
-Tobias
Post by c***@source.squeak.org
This change implements the possibly better fix.
=============== Diff against Installer-Core-cmm.424 ===============
----- Method: InstallerMonticello>>mcDetectFileBlock: (in category 'monticello') -----
mcDetectFileBlock: pkg
pkg isString ifTrue: [ ^ [ :aMCVersionName |
+ (pkg beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName = pkg ] ] ].
- (pkg beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: pkg ] ] ].
(pkg isKindOf: Array)
ifTrue: [ ^ [ :aMCVersionName | pkg anySatisfy: [ :item |
+ (item beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName = item ] ] ] ].
- (item beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: item ] ] ] ].
pkg isBlock ifTrue: [ ^ pkg ].
!
Levente Uzonyi
2018-11-08 22:48:50 UTC
Permalink
Post by David T. Lewis
Post by Tobias Pape
Post by c***@source.squeak.org
http://source.squeak.org/inbox/Installer-Core-dtl.425.mcz
==================== Summary ====================
Name: Installer-Core-dtl.425
Author: dtl
Time: 7 November 2018, 9:24:32.82223 pm
UUID: 6a5d8822-147f-460a-9aac-b17f02399538
Ancestors: Installer-Core-cmm.424
In the case of a repository containing both 'Chronology-Core-dtl.3' and
'Chronology-Core-dtl.30', the following will incorrectly load version 30 rather
than version 3.
(Installer ss project: 'UTCDateAndTime') install: 'Chronology-Core-dtl.3'
A workaround is to reverse the order of sorting in InstallerMonticello>>mcSortFileBlock, such that 'Chronology-Core-dtl.3' will be detected before 'Chronology-Core-dtl.30' in InstallerMonticello>>mcThing.
A possibly better fix is to change InstallerMonticello>>mcDetectFileBlock: to do string equality checks rather than #beginsWith: comparisons. This appears to be correct, but might have side effects, since I do not know the original rationale for using #beginsWith:.
Isn't the rationale that you cat do
Installer squeaksource
project: 'UTCDateAndTime';
install: 'Chronology-Core'.
and get just the latest one ?
Ah yes of course. So this proposed fix is wrong.
We still do need a way for an explicit version to be loaded reliably. hmmm...
I think the best solution would be if the code tried to find an exact
match first and when there was none, use the current code: sort by
versionNames and find the first that matches by prefix.

Levente
Post by David T. Lewis
Dave
Post by Tobias Pape
Best regards
-Tobias
Post by c***@source.squeak.org
This change implements the possibly better fix.
=============== Diff against Installer-Core-cmm.424 ===============
----- Method: InstallerMonticello>>mcDetectFileBlock: (in category 'monticello') -----
mcDetectFileBlock: pkg
pkg isString ifTrue: [ ^ [ :aMCVersionName |
+ (pkg beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName = pkg ] ] ].
- (pkg beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: pkg ] ] ].
(pkg isKindOf: Array)
ifTrue: [ ^ [ :aMCVersionName | pkg anySatisfy: [ :item |
+ (item beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName = item ] ] ] ].
- (item beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: item ] ] ] ].
pkg isBlo
David T. Lewis
2018-11-09 01:20:35 UTC
Permalink
Post by Levente Uzonyi
Post by David T. Lewis
Post by c***@source.squeak.org
Post by c***@source.squeak.org
http://source.squeak.org/inbox/Installer-Core-dtl.425.mcz
==================== Summary ====================
Name: Installer-Core-dtl.425
Author: dtl
Time: 7 November 2018, 9:24:32.82223 pm
UUID: 6a5d8822-147f-460a-9aac-b17f02399538
Ancestors: Installer-Core-cmm.424
In the case of a repository containing both 'Chronology-Core-dtl.3' and
'Chronology-Core-dtl.30', the following will incorrectly load version
30 rather
Post by c***@source.squeak.org
than version 3.
'Chronology-Core-dtl.3'
Post by c***@source.squeak.org
A workaround is to reverse the order of sorting in
InstallerMonticello>>mcSortFileBlock, such that 'Chronology-Core-dtl.3'
will be detected before 'Chronology-Core-dtl.30' in
InstallerMonticello>>mcThing.
Post by c***@source.squeak.org
A possibly better fix is to change
InstallerMonticello>>mcDetectFileBlock: to do string equality checks
rather than #beginsWith: comparisons. This appears to be correct, but
might have side effects, since I do not know the original rationale for
using #beginsWith:.
Isn't the rationale that you cat do
Installer squeaksource
project: 'UTCDateAndTime';
install: 'Chronology-Core'.
and get just the latest one ?
Ah yes of course. So this proposed fix is wrong.
We still do need a way for an explicit version to be loaded reliably. hmmm...
I think the best solution would be if the code tried to find an exact
match first and when there was none, use the current code: sort by
versionNames and find the first that matches by prefix.
Levente
That sounds right to me. I put Installer-Core-dtl.426 in the inbox,
which hopefully implements

Loading...