Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v3) RwProject>>reload should use #loadedLoadSpecifications as starting point to ENSURE that loaded project specifications are honored correctly #926

Closed
dalehenrich opened this issue Apr 10, 2024 · 2 comments
Assignees

Comments

@dalehenrich
Copy link
Member

dalehenrich commented Apr 10, 2024

The implementation of reload should use the loadedLoadSpecificaions/read:/load sequence:

bosch:RowanV3>git diff
diff --git a/upgrade/projectsHome/RowanUpgrade/rowan/src/RowanUpgrade-Core/UpgradeRowanV2.class.st b/upgrade/projectsHome/RowanUpgrade/rowan/src/RowanUpgrade-Core/UpgradeRowanV2.class.st
index 29f796a2b..dd6e35212 100644
--- a/upgrade/projectsHome/RowanUpgrade/rowan/src/RowanUpgrade-Core/UpgradeRowanV2.class.st
+++ b/upgrade/projectsHome/RowanUpgrade/rowan/src/RowanUpgrade-Core/UpgradeRowanV2.class.st
@@ -561,7 +561,7 @@ UpgradeRowanV2 >> reloadGemstoneBase [
 
 { #category : 'upgrade rowan' }
 UpgradeRowanV2 >> reloadRowan [
-       | project platformConditionalAttributes theProjectSet |
+       | project platformConditionalAttributes loadSpecSet projectDefinitionSet |
        self adoptRowan.
        project := Rowan projectNamed: 'Rowan'.
        platformConditionalAttributes := project platformConditionalAttributes
@@ -570,10 +570,9 @@ UpgradeRowanV2 >> reloadRowan [
                        (attribute isKindOf: RwGemStoneVersionNumber)
                                ifTrue: [ (System gemVersionReport at: 'gsVersion') asRwGemStoneVersionNumber ]
                                ifFalse: [ attribute ] ].
-       theProjectSet := project defined
-               readProjectSet: project customConditionalAttributes
-               platformConditionalAttributes: platformConditionalAttributes.
-       [ Rowan projectTools load loadProjectSetDefinition: theProjectSet ]
+      loadSpecSet := project loadedLoadSpecifications.
+       projectDefinitionSet := loadSpecSet read: platformConditionalAttributes.
+       [ projectDefinitionSet load ]
                on: CompileWarning
                do: [ :ex | ex resume ]
 ]
@dalehenrich dalehenrich self-assigned this Apr 10, 2024
@dalehenrich dalehenrich changed the title (v3) all use of readProjectSet: should be removed from the Rowan (v3) all use of readProjectSet: should be removed from Rowan3 Apr 10, 2024
dalehenrich added a commit that referenced this issue Apr 10, 2024
@dalehenrich dalehenrich changed the title (v3) all use of readProjectSet: should be removed from Rowan3 (v3) RwProject>>reload should use #loadedLoadSpecifications as starting point to ENSURE that loaded project specifications are honored correctly Apr 10, 2024
@dalehenrich
Copy link
Member Author

Slight change in semantics of reload is required (not reading specs from disk) for the most common case of picking up changes from a new commit ...

Picking up specification changes from disk is way too complicated to do automatically, because we do not know what choices the developer made during the initial load (mainly involving changes to projectHomes, but custom attribute changes count as well), so the best solution is to remove the project(s) from the image and repeat the initial load expression or to replace loaded load specs with new copies read from disk or ....)

dalehenrich added a commit that referenced this issue Apr 10, 2024
… in the standard reload case (reload packages)
@dalehenrich
Copy link
Member Author

battery tests passing for 3.7.2 and 0a0a7f1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant