Bloc icon indicating copy to clipboard operation
Bloc copied to clipboard

Loading bloc with setting open breaks the loading.

Open Ducasse opened this issue 5 years ago • 2 comments

Ducasse avatar Feb 15 '21 19:02 Ducasse

May be related to https://github.com/pharo-graphics/Bloc/issues/85

But that was when I loaded only BaselineOfBlocMorphic.

tinchodias avatar Feb 15 '21 19:02 tinchodias

I just tried it in 90+vm and it happens, too. Yes, as suspected, it is related to #85 and probably to https://github.com/pharo-graphics/Bloc/issues/81.

It should be related to a unexpressed (and undesired I think) dependency between some packages, and so when the Settings Browser that is opened refreshes during the load, this method looks for a still unloaded class:

Bloc class >>
preferencesOn: aBuilder
	<systemsettings>
	(aBuilder group: #Bloc)
		label: 'Bloc';
		description: 'Bloc settings';
		parent: self preferencesGroup;
		with: [
			(aBuilder pickOne: #preferableHostClass)
				target: self;
				order: 1;
				label: 'Preferable host';
				domainValues: { 'Automatic' -> nil } , (BlHost availableHostClasses collect: [ :aHostClass | aHostClass label -> aHostClass ]);
				description: 'Choose which host to be used for opening spaces'.

			(aBuilder pickOne: #preferableSpartaCanvas)
				target: self;
				order: 2;
				precondition: [ self environment includesKey: #BlSpartaRenderer ];
				label: 'Preferable Sparta renderering backend' ;
				domainValues: ((self environment at: #BlSpartaRenderer) availableCanvasBuilderClasses collect: [ :aBuilderClass | aBuilderClass label -> aBuilderClass ]);
				description: 'Choose which graphical library should be used to render bloc spaces'.
				
			(aBuilder pickOne: #preferableEventHandlerRegistry)
				target: self;
				order: 3;
				label: 'Preferable event handler registry backend' ;
				domainValues: ((BlHandlerRegistry availableRegistryClasses collect: [ :aClass | aClass label -> aClass ]) sort: [ :a :b | a key < b key ]);
				description: 'Choose which data structure should be used for event handler registry'.
				
			(aBuilder pickOne: #preferableChildrenDataStructure)
				target: self;
				order: 4;
				label: 'Preferable children data structure' ;
				domainValues: { BlChildrenArray . BlChildrenRope . BlChildrenLinkedList };
				description: 'Choose which data structure should be used to store element''s children'.

			(aBuilder setting: #assertionsEnabled)
				order: 5;
				target: self;
				label: 'Assertions';
				description: 'Set enabled to turn assertions on or disable to turn them off';
				default: [ true ].
				
			(aBuilder setting: #debugModeEnabled)
				order: 6;
				target: self;
				label: 'Debug Mode';
				description: 'Set enabled to turn extensive debugging mode on or disable to turn it off';
				default: [ false ].
		]

Our baseline has this:

BaselineOfNewBloc >>
baseline: spec
	<baseline>
	spec
		for: #common
		do: [
			spec
				baseline: 'BlocLayout'
					with: [ spec repository: 'github://pharo-graphics/Bloc/src' ];
				baseline: 'BlocMorphic'
					with: [ spec repository: 'github://pharo-graphics/Bloc/src' ];
				baseline: 'BlocSparta'
					with: [ spec repository: 'github://pharo-graphics/Bloc/src' ].
			spec
				group: 'default'
				with: #(BlocSparta BlocMorphic BlocLayout) ]

I imagine that BlocLayout or BlocMorphic load this Bloc class, but still BlocSparta isn't loaded since Metacello doesn't know about the dependency.

tinchodias avatar Feb 23 '21 23:02 tinchodias

Let's close this issue. It's too old and many things changed.

tinchodias avatar Mar 15 '23 14:03 tinchodias