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

STONReaderError: At character 0: invalid input #482

Open
vitormcruz opened this issue Oct 10, 2017 · 0 comments
Open

STONReaderError: At character 0: invalid input #482

vitormcruz opened this issue Oct 10, 2017 · 0 comments

Comments

@vitormcruz
Copy link

On a Windows 7 system, trying to update Icberg as described in the readme I got the following error:

Author: vitormcruz

STONReader>>error:
STONReader>>parseSimpleValue
STONReader>>parseValue
STONReader>>next
STON class>>fromStream:
[ :fileStream | classPropertiesDict := STON fromStream: fileStream ] in MCFileTreeStCypressReader>>addClassAndMethodDefinitionsFromEntry:
[ aBlock value: stream ] in FileReference(AbstractFileReference)>>readStreamDo:
BlockClosure>>ensure:
FileReference(AbstractFileReference)>>readStreamDo:
FileSystemDirectoryEntry>>readStreamDo:
MCFileTreeStCypressReader>>addClassAndMethodDefinitionsFromEntry:
[ :entry |
(entry name endsWith: '.trait')
ifTrue: [ self addTraitAndMethodDefinitionsFromEntry: entry ].
(entry name endsWith: '.class')
ifTrue: [ self addClassAndMethodDefinitionsFromEntry: entry ].
(entry name endsWith: '.extension')
ifTrue: [ self addExtensionClassAndMethodDefinitionsFromEntry: entry ] ] in MCFileTreeStCypressReader>>addClassAndMethodDefinitionsFromDirectory:
Array(SequenceableCollection)>>do:
MCFileTreeStCypressReader>>addClassAndMethodDefinitionsFromDirectory:
MCFileTreeStCypressReader>>loadDefinitions
MCFileTreeStCypressReader(MCVersionReader)>>definitions
MCFileTreeStCypressReader(MCVersionReader)>>snapshot
MCFileTreeStCypressReader>>basicVersion
MCFileTreeStCypressReader(MCVersionReader)>>version
[ :r | r version ] in MCGitHubRepository(MCFileBasedRepository)>>loadVersionFromFileNamed:
[ :s |
(MCVersionReader readerClassForFileNamed: aString)
ifNotNil: [ :class | aBlock value: (class on: s fileName: aString) ] ] in MCGitHubRepository(MCFileBasedRepository)>>versionReaderForFileNamed:do:
MCGitHubRepository(MCFileTreeRepository)>>readStreamForFileNamed:do:
MCGitHubRepository(MCFileBasedRepository)>>versionReaderForFileNamed:do:
MCGitHubRepository(MCFileBasedRepository)>>loadVersionFromFileNamed:
[ :packageDirectory |
(self versionInfoForPackageDirectory: packageDirectory) name
= aVersionReferenceString
ifTrue: [ ^ self
loadVersionFromFileNamed: (self fileUtils directoryName: packageDirectory) ] ] in MCGitHubRepository(MCFileTreeRepository)>>versionFrom:
[ :stream |
1 to: self size do: [ :index |
(selectBlock value: (each := self at: index))
ifTrue: [ stream nextPut: (collectBlock value: each) ] ] ] in Array(SequenceableCollection)>>select:thenCollect:
Array class(SequenceableCollection class)>>new:streamContents:
Array(SequenceableCollection)>>select:thenCollect:
MCGitHubRepository(MCFileTreeRepository)>>versionFrom:
MetacelloCachingGoferResolvedReference(GoferResolvedReference)>>version
MetacelloCachingGoferResolvedReference>>version
[ :each | each version ] in [ "ensure that all resolved references have cached their version while wrapped by error handler"
aCollection do: [ :each | each version ].
nearestReference version dependencies do: block.
notDone := false ] in MetacelloFetchingMCSpecLoader>>resolveDependencies:nearest:into:
OrderedCollection>>do:
[ "ensure that all resolved references have cached their version while wrapped by error handler"
aCollection do: [ :each | each version ].
nearestReference version dependencies do: block.
notDone := false ] in MetacelloFetchingMCSpecLoader>>resolveDependencies:nearest:into:
BlockClosure>>on:do:
MetacelloFetchingMCSpecLoader>>resolveDependencies:nearest:into:
[ | 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:
[ "exact match between packageSpec file and cache" ^ self scheduleFetchFor: packageSpec cachedReference: cachedReference ] ]. "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: [ "latest reference in repository matches cachedReference ... "
^ self
scheduleFetchFor: packageSpec
nearestReference: nearestReference ]. "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:
OrderedCollection>>do:
MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>linearLoadPackageSpecs:repositories:
[ super
linearLoadPackageSpecs: packageSpecs
repositories: repositories ] in MetacelloFetchingMCSpecLoader>>linearLoadPackageSpecs:repositories:
BlockClosure>>ensure:
MetacelloLoaderPolicy>>pushLoadDirective:during:
MetacelloLoaderPolicy>>pushLinearLoadDirectivesDuring:for:
MetacelloFetchingMCSpecLoader>>linearLoadPackageSpecs:repositories:
MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>load
MetacelloMCVersionSpecLoader>>load
MetacelloMCVersion>>executeLoadFromArray:
[ :dict | ^ self executeLoadFromArray: anArray ] in [ self versionSpec loader: newLoader.
MetacelloPlatform current
useStackCacheDuring: [ :dict | ^ self executeLoadFromArray: anArray ]
defaultDictionary: Dictionary new ] in [ [ self versionSpec loader: newLoader.
MetacelloPlatform current
useStackCacheDuring: [ :dict | ^ self executeLoadFromArray: anArray ]
defaultDictionary: Dictionary new ]
ensure: [ self versionSpec loader: originalLoader ] ] in MetacelloMCVersion>>fetchRequiredFromArray:
[ ^ aBlock value: dict ] in MetacelloPharo30Platform(MetacelloPlatform)>>useStackCacheDuring:defaultDictionary:
BlockClosure>>on:do:
MetacelloPharo30Platform(MetacelloPlatform)>>useStackCacheDuring:defaultDictionary:
[ self versionSpec loader: newLoader.
MetacelloPlatform current
useStackCacheDuring: [ :dict | ^ self executeLoadFromArray: anArray ]
defaultDictionary: Dictionary new ] in [ [ self versionSpec loader: newLoader.
MetacelloPlatform current
useStackCacheDuring: [ :dict | ^ self executeLoadFromArray: anArray ]
defaultDictionary: Dictionary new ]
ensure: [ self versionSpec loader: originalLoader ] ] in MetacelloMCVersion>>fetchRequiredFromArray:
BlockClosure>>ensure:
[ [ self versionSpec loader: newLoader.
MetacelloPlatform current
useStackCacheDuring: [ :dict | ^ self executeLoadFromArray: anArray ]
defaultDictionary: Dictionary new ]
ensure: [ self versionSpec loader: originalLoader ] ] in MetacelloMCVersion>>fetchRequiredFromArray:
MetacelloPharo30Platform(MetacelloPlatform)>>do:displaying:
MetacelloMCVersion>>fetchRequiredFromArray:
[ | fetchLoader |
fetchLoader := self
fetchRequiredFromArray: (self defaultPackageNamesToLoad: anArray).
MetacelloPlatform current
do: [ fetchLoader doLoad ]
displaying: 'Loading ' , displayString.
Transcript
cr;
show: '...finished ' , self versionNumber printString.
^ fetchLoader ] in MetacelloMCVersion>>doLoadRequiredFromArray:
BlockClosure>>ensure:
MetacelloMCVersion>>doLoadRequiredFromArray:
MetacelloMCVersion>>load
[ | 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 | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ] in [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ] in [ [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ]
on: MetacelloAllowLockedProjectChange
do:
[ :ex | "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ex handleResolutionFor: self ] ] in MetacelloScriptEngine>>handleNotificationsForAction:
BlockClosure>>on:do:
[ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ] in [ [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ]
on: MetacelloAllowLockedProjectChange
do:
[ :ex | "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ex handleResolutionFor: self ] ] in MetacelloScriptEngine>>handleNotificationsForAction:
BlockClosure>>on:do:
[ [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ]
on: MetacelloAllowLockedProjectChange
do:
[ :ex | "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ex handleResolutionFor: self ] ] 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:
WorldMorph>>doOneCycle
WorldMorph class>>doOneCycle
[ [ WorldMorph doOneCycle.
Processor yield.
false ] whileFalse: [ ] ] in MorphicUIManager>>spawnNewProcess
[ self value.
Processor terminateActive ] in BlockClosure>>newProcess

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