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

Discard all when I have zero metadata raises an arror #1844

Open
ElsaLogier opened this issue Sep 6, 2024 · 4 comments
Open

Discard all when I have zero metadata raises an arror #1844

ElsaLogier opened this issue Sep 6, 2024 · 4 comments

Comments

@ElsaLogier
Copy link

Capture d'écran 2024-09-06 122843

How I did and reproduced it :

  • New Pharo image (Official distribution Pharo 12.0)
  • Create a new package with a class and methods
  • Open iceberg and add a new repository
  • Add the package
  • Click on "Discard All"
@ElsaLogier
Copy link
Author

IceNoCommit(Object)>>doesNotUnderstand: #shortId
IceTipDiscardAllChangesPreviewBrowser>>loadCommitShortId
IceTipDiscardAllChangesPreviewBrowser>>initializePresenters
IceTipDiscardAllChangesPreviewBrowser(SpPresenter)>>initializePrivateHooks
IceTipDiscardAllChangesPreviewBrowser(SpPresenter)>>initialize
IceTipDiscardAllChangesPreviewBrowser(IceTipBrowser)>>initialize
IceTipDiscardAllChangesPreviewBrowser class(SpPresenter class)>>newApplication:model:
IceTipDiscardAllChangesPreviewBrowser class(SpPresenter class)>>on:
IceTipDiscardAllChangesPreviewBrowser class>>onRepository:
IceTipDiscardChangesCommand>>execute
IceTipSpCommand(CmCommandDecorator)>>execute
[ aCommand execute ] in IceTipToolbarButtonStrategy(IceTipCommandToPresenterBuildingStrategy)>>resultOn: in Block: [ aCommand execute ]
FullBlockClosure(BlockClosure)>>cull:
SpMorphicToolbarButtonAdapter>>execute
SpToolbarButtonMorph(PluggableButtonMorph)>>performAction:
[:m |
(m containsPoint: evt cursorPoint) ifTrue: [m enabled ifTrue: [ m performAction: evt ]]] in SpToolbarButtonMorph(PluggableButtonMorph)>>mouseUp: in Block: [:m |...
Array(SequenceableCollection)>>do:
SpToolbarButtonMorph(PluggableButtonMorph)>>mouseUp:
SpToolbarButtonMorph(Morph)>>handleMouseUp:
MouseButtonEvent>>sentTo:
SpToolbarButtonMorph(Morph)>>handleEvent:
SpToolbarButtonMorph(Morph)>>handleFocusEvent:
[
result := focusHolder handleFocusEvent: transformedEvent.
] in HandMorph>>sendFocusEvent:to:clear: in Block: [...
FullBlockClosure(BlockClosure)>>on:do:
WorldMorph>>becomeActiveDuring:
HandMorph>>sendFocusEvent:to:clear:
HandMorph>>sendEvent:focus:clear:
HandMorph>>sendMouseEvent:
HandMorph>>handleEvent:
HandMorph>>processEvents
[:h |
self activeHand: h.
h processEvents.
self activeHand: nil.
] in WorldState>>doOneCycleFor: in Block: [:h |...
Array(SequenceableCollection)>>do:
WorldState>>handsDo:
WorldState>>doOneCycleFor:
WorldMorph>>doOneCycleNow
WorldMorph>>doOneCycle
[
| extraWorldsToDraw |
extraWorldsToDraw := ExtraWorldListMutex critical: [
self extraWorldList ].
extraWorldsToDraw do: [ :world | world doOneCycle ].

	(self currentWorld isNotNil and: [
		 (extraWorldsToDraw includes: self currentWorld) not ]) ifTrue: [
		self currentWorld doOneCycle ] ] in WorldMorph class>>doOneCycle in Block: [...

FullBlockClosure(BlockClosure)>>ensure:
WorldState class>>doDrawCycleWith:
WorldMorph class>>doOneCycle
MorphicRenderLoop>>doOneCycle
MorphicRenderLoop>>doOneCycleWhile:
[ MorphicRenderLoop new doOneCycleWhile: [ true ] ] in MorphicUIManager>>spawnNewProcess in Block: [ MorphicRenderLoop new doOneCycleWhile: [ tru[..]
[self value.
"IMPORTANT: Do not step over next line of code. See method comments for details"
Processor terminateRealActive] in FullBlockClosure(BlockClosure)>>newProcess in Block: [self value....

@Ducasse
Copy link
Collaborator

Ducasse commented Nov 5, 2024

We can reproduce it Pharo 13 (Pharo-13.0.0+SNAPSHOT.build.297.sha.9d19b62922b7fc72f44387254700dafd12c8c4a3
)

@Ducasse
Copy link
Collaborator

Ducasse commented Nov 5, 2024

We defined

IceNoCommit >> shortId

	^ 'nocommit id'

It does not raise an error anymore and the caller is the following one.

initializePresenters 

	super initializePresenters.
	
	diffPanel
		leftLabel: 'Working Copy (Image)';
		rightLabel: 'Commit to load: ', self loadCommitShortId

Now I do not know if adding shortId on IceNoCommit is a good idea.

@Ducasse
Copy link
Collaborator

Ducasse commented Nov 5, 2024

@tesonep do you think that this is safe? I cannot simply run locally the tests

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

No branches or pull requests

2 participants