Chris Muller uploaded a new version of Installer-Core to project The Inbox: http://source.squeak.org/inbox/Installer-Core-cmm.427.mcz
==================== Summary ====================
Name: Installer-Core-cmm.427 Author: cmm Time: 9 November 2018, 1:46:00.513629 pm UUID: 080be346-3724-453d-ab98-190199cc236f Ancestors: Installer-Core-cmm.424
If an explicit MC version is specified for Installer, load that version. Otherwise load the most recent version of the applicable package or package branch.
=============== Diff against Installer-Core-cmm.424 ===============
Item was removed: - ----- Method: InstallerMonticello>>mcDetectFileBlock: (in category 'monticello') ----- - mcDetectFileBlock: pkg - - pkg isString ifTrue: [ ^ [ :aMCVersionName | - (pkg beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: pkg ] ] ]. - - (pkg isKindOf: Array) - ifTrue: [ ^ [ :aMCVersionName | pkg anySatisfy: [ :item | - (item beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: item ] ] ] ]. - - pkg isBlock ifTrue: [ ^ pkg ]. - !
Item was changed: ----- Method: InstallerMonticello>>mcThing (in category 'monticello') ----- mcThing | loader | loader := self classMCVersionLoader new.
"several attempts to read files - repository readableFileNames sometimes fails" self packages + do: [:pkg | + | mcVersion versionNames sortedVersions fileToLoad version | + mcVersion := pkg asMCVersionName . - do: [:pkg | - | versionNames fileToLoad version | versionNames := mc versionNamesForPackageNamed: + (mcVersion versionNumber = 0 - (pkg asMCVersionName versionNumber = 0 ifTrue: [ "Just a package name specified, use it whole." pkg ] + ifFalse: [mcVersion packageName]). + sortedVersions := versionNames sorted: self mcSortFileBlock. + fileToLoad := self versionToLoad: mcVersion fromVersions: sortedVersions. - ifFalse: [pkg asMCVersionName packageName]). - fileToLoad := (versionNames sorted: self mcSortFileBlock) - detect: (self mcDetectFileBlock: pkg) - ifNone: [ nil ]. fileToLoad ifNotNil: [version := mc versionNamed: fileToLoad. (version isKindOf: MCConfiguration) ifTrue: [^ version] ifFalse: [self normalizedRepositories do: [:repo | MCRepositoryGroup default addRepository: repo]. self normalizedRepositories do: [:repo | version workingCopy repositoryGroup addRepository: repo]. loader addVersion: version]. self logCR: ' found ' , version fileName , '...']]. ^ loader!
Item was added: + ----- Method: InstallerMonticello>>versionToLoad:fromVersions: (in category 'monticello') ----- + versionToLoad: mcVersion fromVersions: sortedVersions + "From a list of sortedVersions, answer the most recent version or the + exact version if explicitly specified." + ^ sortedVersions + detect: [:aMCVersionName | aMCVersionName = mcVersion "explicit version specified"] + ifNone: [sortedVersions + detect: [:aMCVersionName | (mcVersion beginsWith: aMCVersionName packageAndBranchName) + and: [aMCVersionName beginsWith: mcVersion "most recent version that matches"]] + ifNone: []]!
Hi Dave, good catch! Say, I imported your method changes directly to the current trunk state in hopes you are okay leaving dtl.425 behind.
If so, please feel move this fix to trunk or I will within the next day or so. This is an important fix because it affects people loading software even in 5.2, so we should also backport it to 5.2.
Regards, ChrisOn Fri, Nov 9, 2018 at 1:46 PM commits@source.squeak.org wrote:
Chris Muller uploaded a new version of Installer-Core to project The Inbox: http://source.squeak.org/inbox/Installer-Core-cmm.427.mcz
==================== Summary ====================
Name: Installer-Core-cmm.427 Author: cmm Time: 9 November 2018, 1:46:00.513629 pm UUID: 080be346-3724-453d-ab98-190199cc236f Ancestors: Installer-Core-cmm.424
If an explicit MC version is specified for Installer, load that version. Otherwise load the most recent version of the applicable package or package branch.
=============== Diff against Installer-Core-cmm.424 ===============
Item was removed:
- ----- Method: InstallerMonticello>>mcDetectFileBlock: (in category 'monticello') -----
- mcDetectFileBlock: pkg
pkg isString ifTrue: [ ^ [ :aMCVersionName |
(pkg beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: pkg ] ] ].
(pkg isKindOf: Array)
ifTrue: [ ^ [ :aMCVersionName | pkg anySatisfy: [ :item |
(item beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: item ] ] ] ].
pkg isBlock ifTrue: [ ^ pkg ].
- !
Item was changed: ----- Method: InstallerMonticello>>mcThing (in category 'monticello') ----- mcThing | loader | loader := self classMCVersionLoader new.
"several attempts to read files - repository readableFileNames sometimes fails" self packages
do: [:pkg |
| mcVersion versionNames sortedVersions fileToLoad version |
mcVersion := pkg asMCVersionName .
do: [:pkg |
| versionNames fileToLoad version | versionNames := mc versionNamesForPackageNamed:
(mcVersion versionNumber = 0
(pkg asMCVersionName versionNumber = 0 ifTrue: [ "Just a package name specified, use it whole." pkg ]
ifFalse: [mcVersion packageName]).
sortedVersions := versionNames sorted: self mcSortFileBlock.
fileToLoad := self versionToLoad: mcVersion fromVersions: sortedVersions.
ifFalse: [pkg asMCVersionName packageName]).
fileToLoad := (versionNames sorted: self mcSortFileBlock)
detect: (self mcDetectFileBlock: pkg)
ifNone: [ nil ]. fileToLoad ifNotNil: [version := mc versionNamed: fileToLoad. (version isKindOf: MCConfiguration) ifTrue: [^ version] ifFalse: [self normalizedRepositories do: [:repo | MCRepositoryGroup default addRepository: repo]. self normalizedRepositories do: [:repo | version workingCopy repositoryGroup addRepository: repo]. loader addVersion: version]. self logCR: ' found ' , version fileName , '...']]. ^ loader!
Item was added:
- ----- Method: InstallerMonticello>>versionToLoad:fromVersions: (in category 'monticello') -----
- versionToLoad: mcVersion fromVersions: sortedVersions
"From a list of sortedVersions, answer the most recent version or the
exact version if explicitly specified."
^ sortedVersions
detect: [:aMCVersionName | aMCVersionName = mcVersion "explicit version specified"]
ifNone: [sortedVersions
detect: [:aMCVersionName | (mcVersion beginsWith: aMCVersionName packageAndBranchName)
and: [aMCVersionName beginsWith: mcVersion "most recent version that matches"]]
ifNone: []]!
Hi Chris,
I presume you didn't see Installer-Core-dtl.426.mcz in the Inbox. Btw, before any of these now competing versions get pushed into the Trunk, I'd like to see tests which document the expected behavior of these methods. I'm pretty sure dtl.426, cmm.427 and the current version in Trunk all behave differently.
Levente
On Fri, 9 Nov 2018, Chris Muller wrote:
Hi Dave, good catch! Say, I imported your method changes directly to the current trunk state in hopes you are okay leaving dtl.425 behind.
If so, please feel move this fix to trunk or I will within the next day or so. This is an important fix because it affects people loading software even in 5.2, so we should also backport it to 5.2.
Regards, ChrisOn Fri, Nov 9, 2018 at 1:46 PM commits@source.squeak.org wrote:
Chris Muller uploaded a new version of Installer-Core to project The Inbox: http://source.squeak.org/inbox/Installer-Core-cmm.427.mcz
==================== Summary ====================
Name: Installer-Core-cmm.427 Author: cmm Time: 9 November 2018, 1:46:00.513629 pm UUID: 080be346-3724-453d-ab98-190199cc236f Ancestors: Installer-Core-cmm.424
If an explicit MC version is specified for Installer, load that version. Otherwise load the most recent version of the applicable package or package branch.
=============== Diff against Installer-Core-cmm.424 ===============
Item was removed:
- ----- Method: InstallerMonticello>>mcDetectFileBlock: (in category 'monticello') -----
- mcDetectFileBlock: pkg
pkg isString ifTrue: [ ^ [ :aMCVersionName |
(pkg beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: pkg ] ] ].
(pkg isKindOf: Array)
ifTrue: [ ^ [ :aMCVersionName | pkg anySatisfy: [ :item |
(item beginsWith: aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: item ] ] ] ].
pkg isBlock ifTrue: [ ^ pkg ].
- !
Item was changed: ----- Method: InstallerMonticello>>mcThing (in category 'monticello') ----- mcThing | loader | loader := self classMCVersionLoader new.
"several attempts to read files - repository readableFileNames sometimes fails" self packages
do: [:pkg |
| mcVersion versionNames sortedVersions fileToLoad version |
mcVersion := pkg asMCVersionName .
do: [:pkg |
| versionNames fileToLoad version | versionNames := mc versionNamesForPackageNamed:
(mcVersion versionNumber = 0
(pkg asMCVersionName versionNumber = 0 ifTrue: [ "Just a package name specified, use it whole." pkg ]
ifFalse: [mcVersion packageName]).
sortedVersions := versionNames sorted: self mcSortFileBlock.
fileToLoad := self versionToLoad: mcVersion fromVersions: sortedVersions.
ifFalse: [pkg asMCVersionName packageName]).
fileToLoad := (versionNames sorted: self mcSortFileBlock)
detect: (self mcDetectFileBlock: pkg)
ifNone: [ nil ]. fileToLoad ifNotNil: [version := mc versionNamed: fileToLoad. (version isKindOf: MCConfiguration) ifTrue: [^ version] ifFalse: [self normalizedRepositories do: [:repo | MCRepositoryGroup default addRepository: repo]. self normalizedRepositories do: [:repo | version workingCopy repositoryGroup addRepository: repo]. loader addVersion: version]. self logCR: ' found ' , version fileName , '...']]. ^ loader!
Item was added:
- ----- Method: InstallerMonticello>>versionToLoad:fromVersions: (in category 'monticello') -----
- versionToLoad: mcVersion fromVersions: sortedVersions
"From a list of sortedVersions, answer the most recent version or the
exact version if explicitly specified."
^ sortedVersions
detect: [:aMCVersionName | aMCVersionName = mcVersion "explicit version specified"]
ifNone: [sortedVersions
detect: [:aMCVersionName | (mcVersion beginsWith: aMCVersionName packageAndBranchName)
and: [aMCVersionName beginsWith: mcVersion "most recent version that matches"]]
ifNone: []]!
Levente,
Thanks, you are right that the change could really use some unit tests. I'll see what I can do to follow up on that this weekend.
Chris, wheever this is in a suitable state, I'll push it to trunk and move all the intermediate junk to treated inbox. It will be one update descended from Installer-Core-cmm.424. Please do let me keep my initials on it though.
Thanks, Dave
On Fri, Nov 09, 2018 at 10:40:41PM +0100, Levente Uzonyi wrote:
Hi Chris,
I presume you didn't see Installer-Core-dtl.426.mcz in the Inbox. Btw, before any of these now competing versions get pushed into the Trunk, I'd like to see tests which document the expected behavior of these methods. I'm pretty sure dtl.426, cmm.427 and the current version in Trunk all behave differently.
Levente
On Fri, 9 Nov 2018, Chris Muller wrote:
Hi Dave, good catch! Say, I imported your method changes directly to the current trunk state in hopes you are okay leaving dtl.425 behind.
If so, please feel move this fix to trunk or I will within the next day or so. This is an important fix because it affects people loading software even in 5.2, so we should also backport it to 5.2.
Regards, ChrisOn Fri, Nov 9, 2018 at 1:46 PM commits@source.squeak.org wrote:
Chris Muller uploaded a new version of Installer-Core to project The Inbox: http://source.squeak.org/inbox/Installer-Core-cmm.427.mcz
==================== Summary ====================
Name: Installer-Core-cmm.427 Author: cmm Time: 9 November 2018, 1:46:00.513629 pm UUID: 080be346-3724-453d-ab98-190199cc236f Ancestors: Installer-Core-cmm.424
If an explicit MC version is specified for Installer, load that version. Otherwise load the most recent version of the applicable package or package branch.
=============== Diff against Installer-Core-cmm.424 ===============
Item was removed:
- ----- Method: InstallerMonticello>>mcDetectFileBlock: (in category
'monticello') -----
- mcDetectFileBlock: pkg
pkg isString ifTrue: [ ^ [ :aMCVersionName |
(pkg beginsWith: aMCVersionName
packageAndBranchName) and: [aMCVersionName beginsWith: pkg ] ] ].
(pkg isKindOf: Array)
ifTrue: [ ^ [ :aMCVersionName | pkg anySatisfy:
[ :item |
(item beginsWith:
aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: item ] ] ] ].
pkg isBlock ifTrue: [ ^ pkg ].
- !
Item was changed:
----- Method: InstallerMonticello>>mcThing (in category 'monticello')
mcThing | loader | loader := self classMCVersionLoader new.
"several attempts to read files - repository readableFileNames sometimes fails" self packages
do: [:pkg |
| mcVersion versionNames sortedVersions
fileToLoad version |
mcVersion := pkg asMCVersionName .
do: [:pkg |
| versionNames fileToLoad version | versionNames := mc versionNamesForPackageNamed:
(mcVersion versionNumber = 0
(pkg asMCVersionName versionNumber = 0 ifTrue: [ "Just a package name specified, use it whole." pkg ]
ifFalse: [mcVersion packageName]).
sortedVersions := versionNames sorted: self
mcSortFileBlock.
fileToLoad := self versionToLoad: mcVersion
fromVersions: sortedVersions.
ifFalse: [pkg asMCVersionName
packageName]).
fileToLoad := (versionNames sorted: self
mcSortFileBlock)
detect: (self
mcDetectFileBlock: pkg)
ifNone: [ nil ]. fileToLoad ifNotNil: [version := mc versionNamed: fileToLoad. (version isKindOf: MCConfiguration) ifTrue: [^ version] ifFalse: [self normalizedRepositories do: [:repo | MCRepositoryGroup default addRepository: repo]. self normalizedRepositories do: [:repo | version workingCopy repositoryGroup addRepository: repo]. loader addVersion: version]. self logCR: ' found ' , version fileName , '...']]. ^ loader!
Item was added:
- ----- Method: InstallerMonticello>>versionToLoad:fromVersions: (in
category 'monticello') -----
- versionToLoad: mcVersion fromVersions: sortedVersions
"From a list of sortedVersions, answer the most recent version or
the
exact version if explicitly specified."
^ sortedVersions
detect: [:aMCVersionName | aMCVersionName = mcVersion
"explicit version specified"]
ifNone: [sortedVersions
detect: [:aMCVersionName | (mcVersion
beginsWith: aMCVersionName packageAndBranchName)
and: [aMCVersionName
beginsWith: mcVersion "most recent version that matches"]]
ifNone: []]!
Hi guys,
On Fri, Nov 09, 2018 at 10:40:41PM +0100, Levente Uzonyi wrote:
I presume you didn't see Installer-Core-dtl.426.mcz in the Inbox.
Yes, I did. Since it had a "interim" version (dtl.425) as an ancestor, I manually imported the metods of dtl.426, so it would be reparented to the one in trunk. (e.g., I clicked the Changes button on dtl.426 and simply installed the methods manually, then saved mine).
Dave wrote:
Chris, wheever this is in a suitable state, I'll push it to trunk and move all the intermediate junk to treated inbox.
Thank you so much!
It will be one update descended from Installer-Core-cmm.424. Please do let me keep my initials on it though.
Yes absolutely, no problem! I definitely made sure to at least import the _methods_ so they would retain your initials, but when I went to save, using your initials on an entire MCVersion didn't feel right, so opted not to.
Btw, before any of these now competing versions get pushed into the Trunk, I'd like to see tests which document the expected behavior of these methods.
Okay, but since this does have some urgency for Squeak 5.2 I did go ahead and push cmm.427 to the /squeak52 repository (Dave, you are welcome to replace it with your initials).
The method comment does explain the expected behavior pretty well ________ install: packageNameCollectionOrDetectBlock "The parameter specifies the package to be installed in one of the following ways: - By Name e.g. install: 'Kernel' - Acceptable Versions e.g. install: #('Comet-lr' 'Comet-pmm') i.e. either of these - Specific version e.g. install: 'Scriptaculous-lr.148' - By Predicate e.g. install: [ :packageName | packageName beginsWith: 'Dynamic' ]"
self addPackage: ... _________
and so this makes me think that the case Dave ran into (that "30" beginsWith: "3") was simply not considered when that implementation was done way back in the day. Just reading the old code, it "loooks right", even though it's not.
- Chris
I will complete the updates this evening. Here is a summary of the changes that I am making in case any problems arise:
- I added the test coverage in Tests-dtl.403.
- The three versions in inbox (Installer-Core-dtl.425, Installer-Core-dtl.426, and Installer-Core-cmm.427) will be moved to treated inbox.
- I will publish a new version to trunk called Installer-Core-dtl.425. This will be the direct descendent of Installer-Core-cmm.424 in trunk, and will contain the correct updates as originally posted to inbox in Installer-Core-dtl.426, and as copied to squeak52 in Installer-Core-cmm.427.
- The squeak52 repository will still contain Installer-Core-cmm.427.
Dave
On Fri, Nov 09, 2018 at 08:28:49PM -0600, Chris Muller wrote:
Hi guys,
On Fri, Nov 09, 2018 at 10:40:41PM +0100, Levente Uzonyi wrote:
I presume you didn't see Installer-Core-dtl.426.mcz in the Inbox.
Yes, I did. Since it had a "interim" version (dtl.425) as an ancestor, I manually imported the metods of dtl.426, so it would be reparented to the one in trunk. (e.g., I clicked the Changes button on dtl.426 and simply installed the methods manually, then saved mine).
Dave wrote:
Chris, wheever this is in a suitable state, I'll push it to trunk and move all the intermediate junk to treated inbox.
Thank you so much!
It will be one update descended from Installer-Core-cmm.424. Please do let me keep my initials on it though.
Yes absolutely, no problem! I definitely made sure to at least import the _methods_ so they would retain your initials, but when I went to save, using your initials on an entire MCVersion didn't feel right, so opted not to.
Btw, before any of these now competing versions get pushed into the Trunk, I'd like to see tests which document the expected behavior of these methods.
Okay, but since this does have some urgency for Squeak 5.2 I did go ahead and push cmm.427 to the /squeak52 repository (Dave, you are welcome to replace it with your initials).
The method comment does explain the expected behavior pretty well ________ install: packageNameCollectionOrDetectBlock "The parameter specifies the package to be installed in one of the following ways: - By Name e.g. install: 'Kernel' - Acceptable Versions e.g. install: #('Comet-lr' 'Comet-pmm') i.e. either of these - Specific version e.g. install: 'Scriptaculous-lr.148' - By Predicate e.g. install: [ :packageName | packageName beginsWith: 'Dynamic' ]"
self addPackage: ...
and so this makes me think that the case Dave ran into (that "30" beginsWith: "3") was simply not considered when that implementation was done way back in the day. Just reading the old code, it "loooks right", even though it's not.
- Chris
On Fri, Nov 09, 2018 at 10:40:41PM +0100, Levente Uzonyi wrote:
Hi Chris,
I presume you didn't see Installer-Core-dtl.426.mcz in the Inbox. Btw, before any of these now competing versions get pushed into the Trunk, I'd like to see tests which document the expected behavior of these methods. I'm pretty sure dtl.426, cmm.427 and the current version in Trunk all behave differently.
Levente
I added some new tests in Tests-dtl.403 that provide coverage.
The tests show a failure for the bug in trunk, as also fail for the incorrect update that I did in Installer-Core-dtl.425. The tests pass for Installer-Core-dtl.426, which contains the correct fix.
Dave
On Fri, 9 Nov 2018, Chris Muller wrote:
Hi Dave, good catch! Say, I imported your method changes directly to the current trunk state in hopes you are okay leaving dtl.425 behind.
If so, please feel move this fix to trunk or I will within the next day or so. This is an important fix because it affects people loading software even in 5.2, so we should also backport it to 5.2.
Regards, ChrisOn Fri, Nov 9, 2018 at 1:46 PM commits@source.squeak.org wrote:
Chris Muller uploaded a new version of Installer-Core to project The Inbox: http://source.squeak.org/inbox/Installer-Core-cmm.427.mcz
==================== Summary ====================
Name: Installer-Core-cmm.427 Author: cmm Time: 9 November 2018, 1:46:00.513629 pm UUID: 080be346-3724-453d-ab98-190199cc236f Ancestors: Installer-Core-cmm.424
If an explicit MC version is specified for Installer, load that version. Otherwise load the most recent version of the applicable package or package branch.
=============== Diff against Installer-Core-cmm.424 ===============
Item was removed:
- ----- Method: InstallerMonticello>>mcDetectFileBlock: (in category
'monticello') -----
- mcDetectFileBlock: pkg
pkg isString ifTrue: [ ^ [ :aMCVersionName |
(pkg beginsWith: aMCVersionName
packageAndBranchName) and: [aMCVersionName beginsWith: pkg ] ] ].
(pkg isKindOf: Array)
ifTrue: [ ^ [ :aMCVersionName | pkg anySatisfy:
[ :item |
(item beginsWith:
aMCVersionName packageAndBranchName) and: [aMCVersionName beginsWith: item ] ] ] ].
pkg isBlock ifTrue: [ ^ pkg ].
- !
Item was changed:
----- Method: InstallerMonticello>>mcThing (in category 'monticello')
mcThing | loader | loader := self classMCVersionLoader new.
"several attempts to read files - repository readableFileNames sometimes fails" self packages
do: [:pkg |
| mcVersion versionNames sortedVersions
fileToLoad version |
mcVersion := pkg asMCVersionName .
do: [:pkg |
| versionNames fileToLoad version | versionNames := mc versionNamesForPackageNamed:
(mcVersion versionNumber = 0
(pkg asMCVersionName versionNumber = 0 ifTrue: [ "Just a package name specified, use it whole." pkg ]
ifFalse: [mcVersion packageName]).
sortedVersions := versionNames sorted: self
mcSortFileBlock.
fileToLoad := self versionToLoad: mcVersion
fromVersions: sortedVersions.
ifFalse: [pkg asMCVersionName
packageName]).
fileToLoad := (versionNames sorted: self
mcSortFileBlock)
detect: (self
mcDetectFileBlock: pkg)
ifNone: [ nil ]. fileToLoad ifNotNil: [version := mc versionNamed: fileToLoad. (version isKindOf: MCConfiguration) ifTrue: [^ version] ifFalse: [self normalizedRepositories do: [:repo | MCRepositoryGroup default addRepository: repo]. self normalizedRepositories do: [:repo | version workingCopy repositoryGroup addRepository: repo]. loader addVersion: version]. self logCR: ' found ' , version fileName , '...']]. ^ loader!
Item was added:
- ----- Method: InstallerMonticello>>versionToLoad:fromVersions: (in
category 'monticello') -----
- versionToLoad: mcVersion fromVersions: sortedVersions
"From a list of sortedVersions, answer the most recent version or
the
exact version if explicitly specified."
^ sortedVersions
detect: [:aMCVersionName | aMCVersionName = mcVersion
"explicit version specified"]
ifNone: [sortedVersions
detect: [:aMCVersionName | (mcVersion
beginsWith: aMCVersionName packageAndBranchName)
and: [aMCVersionName
beginsWith: mcVersion "most recent version that matches"]]
ifNone: []]!
squeak-dev@lists.squeakfoundation.org