seandenigris / St-Google-API

Richard Prinz's Google Service Discovery API Generator
MIT License
5 stars 5 forks source link

Metacello error #2

Open ahdach opened 6 years ago

ahdach commented 6 years ago

Hi Sean,

I was trying to use the original code until I faced the same issues you mention here.

I'm also looking to use the Gmail API. :)

Then, found your repo but could not even load it.

Any suggestion?

I tried:

Metacello new
     baseline: 'GoogleApi';
     repository: 'https://github.com/seandenigris/St-Google-API/repository';
     load.

And got: MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>retryingResolvePackageSpecReferences:gofer: [ | references nearestReference cachedReference externalReference mcVersion loadedVersionInfos | "check to see if mcz file is already in cacheRepository" cachedReference := self resolvePackageSpec: packageSpec cachedGofer: self loaderPolicy cacheGofer. (cachedReference ~~ nil and: [ packageSpec getFile ~~ nil ]) ifTrue: [ cachedReference name = packageSpec file ifTrue: [ ^ self scheduleFetchFor: packageSpec cachedReference: cachedReference ] "exact match between packageSpec file and cache" ]. "look up mcz file" references := self retryingResolvePackageSpecReferences: packageSpec gofer: gofer. nearestReference := references last asMetacelloCachingResolvedReference. "If the mcz is already in the cacheRepository, no need to copy" (cachedReference ~~ nil and: [ cachedReference name = nearestReference name ]) ifTrue: [ ^ self scheduleFetchFor: packageSpec nearestReference: nearestReference ]. "latest reference in repository matches cachedReference ... " "If the mcz is already loaded into the image, no need to copy" (self ignoreImage not and: [ (loadedVersionInfos := self ancestorsFor: packageSpec) ~~ nil ]) ifTrue: [ loadedVersionInfos do: [ :info | info name = nearestReference name ifTrue: [ | spc | spc := packageSpec copy. spc file: info name. (MetacelloIgnorePackageLoaded signal: spc) ifFalse: [ ^ self ] ] ] ]. externalReference := (references select: [ :ref | ref name = nearestReference name ]) first asMetacelloCachingResolvedReference. self repositoryMap at: externalReference name put: externalReference repository. (self resolveDependencies: externalReference nearest: nearestReference into: (OrderedCollection with: nearestReference)) do: [ :reference | | pSpec l | mcVersion := reference version. (l := (GoferVersionReference name: reference name) resolveAllWith: self loaderPolicy cacheGofer) isEmpty ifTrue: [ self cacheRepository storeVersion: mcVersion. reference == nearestReference ifTrue: [ pSpec := packageSpec ] ifFalse: [ pSpec := packageSpec project packageSpec. pSpec name: mcVersion package name ]. self loadData addVersion: mcVersion versionInfo: mcVersion info resolvedReference: reference packageSpec: pSpec ] ]. self scheduleFetchFor: packageSpec externalReference: externalReference ] in MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer: MetacelloPharo30Platform(MetacelloPlatform)>>do:displaying: MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer: MetacelloPackageSpec>>loadUsing:gofer: [ :pkg | pkg loadUsing: self gofer: gofer ] in MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>linearLoadPackageSpecs:repositories: Array(SequenceableCollection)>>do: MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>linearLoadPackageSpecs:repositories: [ super linearLoadPackageSpecs: packageSpecs repositories: repositories ] in MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories: BlockClosure>>ensure: MetacelloLoaderPolicy>>pushLoadDirective:during: MetacelloLoaderPolicy>>pushExplicitLoadDirectivesDuring:for: MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories: MetacelloPackageSpec>>explicitLoadUsing: MetacelloPackageSpec>>load [ spec projectPackage load ] in MetacelloScriptEngine>>getBaselineUnconditionalLoad: BlockClosure>>on:do: MetacelloScriptEngine>>getBaselineUnconditionalLoad: MetacelloScriptEngine>>getBaselineProjectUnconditionalLoad: MetacelloMCBaselineProject>>projectForScriptEngine:unconditionalLoad: MetacelloMCBaselineProject(MetacelloProject)>>projectForScriptEngine: MetacelloMCBaselineOfProjectSpec(MetacelloMCProjectSpec)>>versionForScriptEngine: [ | version loadedSpec | self setDefaultsAndValidateProjectSpec. [ loadedSpec := (self lookupProjectSpecFor: self projectSpec) copy ] on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade do: [ :ex | ex handleOnDownGrade: onDownGradeBlock onUpgrade: onUpgradeBlock ]. version := loadedSpec versionForScriptEngine: self. self root: (required isEmpty ifTrue: [ version load ] ifFalse: [ version load: required ]) loadDirective. loadedSpec loads: required. MetacelloProjectRegistration registrationForProjectSpec: loadedSpec ifAbsent: [ :new | new loadedInImage: true; registerProject ] ifPresent: [ :existing :new | existing copyOnWrite: [ :existingCopy | existingCopy loadedInImage: true; merge: new ] ] ] in [ self handleNotificationsForAction: [ | version loadedSpec | self setDefaultsAndValidateProjectSpec. [ loadedSpec := (self lookupProjectSpecFor: self projectSpec) copy ] on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade do: [ :ex | ex handleOnDownGrade: onDownGradeBlock onUpgrade: onUpgradeBlock ]. version := loadedSpec versionForScriptEngine: self. self root: (required isEmpty ifTrue: [ version load ] ifFalse: [ version load: required ]) loadDirective. loadedSpec loads: required. MetacelloProjectRegistration registrationForProjectSpec: loadedSpec ifAbsent: [ :new | new loadedInImage: true; registerProject ] ifPresent: [ :existing :new | existing copyOnWrite: [ :existingCopy | existingCopy loadedInImage: true; merge: new ] ] ] ] in MetacelloScriptEngine>>load:onProjectDownGrade:onProjectUpgrade: BlockClosure>>on:do: [ actionBlock on: MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad , MetacelloProjectSpecLoadedNotification , MetacelloScriptEnsureProjectLoadedForDevelopment , MetacelloLookupBaselineSpecForEnsureLoad do: [ :ex | ex handleResolutionFor: self ] "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ] in [ [ actionBlock on: MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad , MetacelloProjectSpecLoadedNotification , MetacelloScriptEnsureProjectLoadedForDevelopment , MetacelloLookupBaselineSpecForEnsureLoad do: [ :ex | ex handleResolutionFor: self ] "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ] on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade , MetacelloAllowConflictingProjectUpgrade do: [ :ex | ex handleResolutionFor: self ] "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ] in [ [ [ actionBlock on: MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad , MetacelloProjectSpecLoadedNotification , MetacelloScriptEnsureProjectLoadedForDevelopment , MetacelloLookupBaselineSpecForEnsureLoad do: [ :ex | ex handleResolutionFor: self ] "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ] on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade , MetacelloAllowConflictingProjectUpgrade do: [ :ex | ex handleResolutionFor: self ] "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ] on: MetacelloAllowLockedProjectChange do: [ :ex | ex handleResolutionFor: self ] "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ] in MetacelloScriptEngine>>handleNotificationsForAction: BlockClosure>>on:do: [ [ actionBlock on: MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad , MetacelloProjectSpecLoadedNotification , MetacelloScriptEnsureProjectLoadedForDevelopment , MetacelloLookupBaselineSpecForEnsureLoad do: [ :ex | ex handleResolutionFor: self ] "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ] on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade , MetacelloAllowConflictingProjectUpgrade do: [ :ex | ex handleResolutionFor: self ] "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ] in [ [ [ actionBlock on: MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad , MetacelloProjectSpecLoadedNotification , MetacelloScriptEnsureProjectLoadedForDevelopment , MetacelloLookupBaselineSpecForEnsureLoad do: [ :ex | ex handleResolutionFor: self ] "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ] on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade , MetacelloAllowConflictingProjectUpgrade do: [ :ex | ex handleResolutionFor: self ] "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ] on: MetacelloAllowLockedProjectChange do: [ :ex | ex handleResolutionFor: self ] "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ] in MetacelloScriptEngine>>handleNotificationsForAction: BlockClosure>>on:do: [ [ [ actionBlock on: MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad , MetacelloProjectSpecLoadedNotification , MetacelloScriptEnsureProjectLoadedForDevelopment , MetacelloLookupBaselineSpecForEnsureLoad do: [ :ex | ex handleResolutionFor: self ] "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ] on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade , MetacelloAllowConflictingProjectUpgrade do: [ :ex | ex handleResolutionFor: self ] "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ] on: MetacelloAllowLockedProjectChange do: [ :ex | ex handleResolutionFor: self ] "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ] in MetacelloScriptEngine>>handleNotificationsForAction: BlockClosure>>on:do: MetacelloScriptEngine>>handleNotificationsForAction: [ self handleNotificationsForAction: [ | version loadedSpec | self setDefaultsAndValidateProjectSpec. [ loadedSpec := (self lookupProjectSpecFor: self projectSpec) copy ] on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade do: [ :ex | ex handleOnDownGrade: onDownGradeBlock onUpgrade: onUpgradeBlock ]. version := loadedSpec versionForScriptEngine: self. self root: (required isEmpty ifTrue: [ version load ] ifFalse: [ version load: required ]) loadDirective. loadedSpec loads: required. MetacelloProjectRegistration registrationForProjectSpec: loadedSpec ifAbsent: [ :new | new loadedInImage: true; registerProject ] ifPresent: [ :existing :new | existing copyOnWrite: [ :existingCopy | existingCopy loadedInImage: true; merge: new ] ] ] ] in MetacelloScriptEngine>>load:onProjectDownGrade:onProjectUpgrade: BlockClosure>>ensure: MetacelloProjectRegistration class>>copyRegistryRestoreOnErrorWhile: MetacelloScriptEngine>>load:onProjectDownGrade:onProjectUpgrade: MetacelloScriptEngine>>load: [ :projectSpec | | engine | engine := MetacelloScriptEngine new options: self options copy; projectSpec: projectSpec; yourself. engine perform: actionArg key withArguments: actionArg value. engine root ifNotNil: [ :root | self roots add: root ] ] in MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: [ :projectSpec | projectSpec ifNotNil: [ projectSpecBlock value: (self applyArgsToProjectSpec: projectSpec copy) ] ] in MetacelloScriptApiExecutor>>executeString:do: Array(SequenceableCollection)>>do: MetacelloScriptApiExecutor>>executeString:do: ByteString(String)>>execute:against: MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: Metacello>>execute:args: Metacello>>load UndefinedObject>>DoIt OpalCompiler>>evaluate RubSmalltalkEditor>>evaluate:andDo: RubSmalltalkEditor>>highlightEvaluateAndDo: [ textMorph textArea editor highlightEvaluateAndDo: ann action. textMorph shoutStyler style: textMorph text ] in [ textMorph textArea handleEdit: [ textMorph textArea editor highlightEvaluateAndDo: ann action. textMorph shoutStyler style: textMorph text ] ] in GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>>actOnHighlightAndEvaluate: RubEditingArea(RubAbstractTextArea)>>handleEdit: [ textMorph textArea handleEdit: [ textMorph textArea editor highlightEvaluateAndDo: ann action. textMorph shoutStyler style: textMorph text ] ] in GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>>actOnHighlightAndEvaluate: WorldState>>runStepMethodsIn: WorldMorph>>runStepMethods WorldState>>doOneCycleNowFor: WorldState>>doOneCycleFor: WorldState>>doOneSubCycleFor: WorldMorph>>doOneSubCycle MenuMorph>>invokeModalAt:in:allowKeyboard: MenuMorph>>invokeModal: MenuMorph>>invokeModal [ :menu | menu setInvokingView: self editor. menu invokeModal. self changed. ^ true ] in RubEditingArea(RubAbstractTextArea)>>yellowButtonActivity: MenuMorph(Object)>>ifNotNilDo: RubEditingArea(RubAbstractTextArea)>>yellowButtonActivity: RubEditingArea(RubAbstractTextArea)>>mouseDown: RubEditingArea(Morph)>>handleMouseDown: MouseButtonEvent>>sentTo: RubEditingArea(Morph)>>handleEvent: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>handleMouseDown: MouseButtonEvent>>sentTo: [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: BlockClosure>>ensure: MorphicEventDispatcher>>dispatchEvent:with: RubEditingArea(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>handleMouseDown: MouseButtonEvent>>sentTo: [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: BlockClosure>>ensure: MorphicEventDispatcher>>dispatchEvent:with: TransformWithLayoutMorph(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>handleMouseDown: MouseButtonEvent>>sentTo: [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: BlockClosure>>ensure: MorphicEventDispatcher>>dispatchEvent:with: RubTextScrollPane(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>handleMouseDown: MouseButtonEvent>>sentTo: [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: BlockClosure>>ensure: MorphicEventDispatcher>>dispatchEvent:with: RubScrolledTextMorph(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>handleMouseDown: MouseButtonEvent>>sentTo: [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: BlockClosure>>ensure: MorphicEventDispatcher>>dispatchEvent:with: PanelMorph(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>handleMouseDown: MouseButtonEvent>>sentTo: [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: BlockClosure>>ensure: MorphicEventDispatcher>>dispatchEvent:with: LazyTabGroupMorph(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>handleMouseDown: MouseButtonEvent>>sentTo: [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: BlockClosure>>ensure: MorphicEventDispatcher>>dispatchEvent:with: PanelMorph(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>handleMouseDown: MouseButtonEvent>>sentTo: [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: BlockClosure>>ensure: MorphicEventDispatcher>>dispatchEvent:with: GLMMorphBrick(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>handleMouseDown: MouseButtonEvent>>sentTo: [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: BlockClosure>>ensure: MorphicEventDispatcher>>dispatchEvent:with: GLMScrollPaneBandBrick(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>handleMouseDown: MouseButtonEvent>>sentTo: [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: BlockClosure>>ensure: MorphicEventDispatcher>>dispatchEvent:with: GLMPagerScrollBrick(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>handleMouseDown: MouseButtonEvent>>sentTo: [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: BlockClosure>>ensure: MorphicEventDispatcher>>dispatchEvent:with: GLMPagerBrick(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>handleMouseDown: MouseButtonEvent>>sentTo: [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: BlockClosure>>ensure: MorphicEventDispatcher>>dispatchEvent:with: GLMFoundationBrick(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>handleMouseDown: MouseButtonEvent>>sentTo: [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: BlockClosure>>ensure: MorphicEventDispatcher>>dispatchEvent:with: GLMSystemWindow(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>handleMouseDown: MouseButtonEvent>>sentTo: [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: BlockClosure>>ensure: MorphicEventDispatcher>>dispatchEvent:with: WorldMorph(Morph)>>processEvent:using: WorldMorph(Morph)>>processEvent: HandMorph>>sendEvent:focus:clear: HandMorph>>sendMouseEvent: HandMorph>>handleEvent: HandMorph>>processEvents [ :h | ActiveHand := h. h processEvents. ActiveHand := nil ] in WorldState>>doOneCycleNowFor: Array(SequenceableCollection)>>do: WorldState>>handsDo: WorldState>>doOneCycleNowFor: WorldState>>doOneCycleFor: WorldMorph>>doOneCycle [ [ World doOneCycle. Processor yield. false ] whileFalse: [ ] ] in MorphicUIManager>>spawnNewProcess [ self value. Processor terminateActive ] in BlockClosure>>newProcess

pdebruic commented 6 years ago

Metacello does special stuff for github repos IIRC. This worked for me:

Metacello new
     baseline: 'GoogleApi';
     repository: 'github://seandenigris/St-Google-API/repository';
     load.