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

Can't load into Pharo 11 #77

Open
edenworky opened this issue Nov 22, 2023 · 2 comments
Open

Can't load into Pharo 11 #77

edenworky opened this issue Nov 22, 2023 · 2 comments

Comments

@edenworky
Copy link

When loading from master like it says in the README:

Metacello new
 	baseline: 'OSSubprocess';
 	repository: 'github://pharo-contributions/OSSubprocess:master/repository';
	load.

I get an error should not be called with more than 3 arguments.
Here's the debugger dump:

ConstantBlockClosure class(Object)>>error:
ConstantBlockClosure class>>numArgs:literal:
OCASTTranslatorForValue(OCASTTranslator)>>visitConstantBlockNode:
OCASTTranslatorForValue(OCASTTranslator)>>visitBlockNode:
RBBlockNode>>acceptVisitor:
OCASTTranslatorForValue(RBProgramNodeVisitor)>>visitNode:
OCASTTranslatorForValue(OCASTTranslator)>>visitNode:
[:each |
		valueTranslator visitNode: each] in OCASTTranslatorForValue(OCASTTranslator)>>emitMessageNode:
OrderedCollection>>do:
OCASTTranslatorForValue(OCASTTranslator)>>emitMessageNode:
OCASTTranslatorForValue(OCASTTranslator)>>visitMessageNode:
RBMessageNode>>acceptVisitor:
OCASTTranslatorForValue(RBProgramNodeVisitor)>>visitNode:
OCASTTranslatorForValue(OCASTTranslator)>>visitNode:
OCASTTranslatorForValue>>visitSequenceNode:
RBSequenceNode>>acceptVisitor:
OCASTTranslatorForValue(RBProgramNodeVisitor)>>visitNode:
OCASTTranslatorForValue(OCASTTranslator)>>visitNode:
OCASTTranslator>>translateFullBlock:
OCASTTranslatorForValue(OCASTTranslator)>>visitBlockNode:
RBBlockNode>>acceptVisitor:
OCASTTranslatorForValue(RBProgramNodeVisitor)>>visitNode:
OCASTTranslatorForValue(OCASTTranslator)>>visitNode:
[:each |
		valueTranslator visitNode: each] in OCASTTranslatorForEffect(OCASTTranslator)>>emitMessageNode:
OrderedCollection>>do:
OCASTTranslatorForEffect(OCASTTranslator)>>emitMessageNode:
OCASTTranslatorForEffect>>emitMessageNode:
OCASTTranslatorForEffect(OCASTTranslator)>>visitMessageNode:
RBMessageNode>>acceptVisitor:
OCASTTranslatorForEffect(RBProgramNodeVisitor)>>visitNode:
OCASTTranslatorForEffect(OCASTTranslator)>>visitNode:
[:each | self visitNode: each] in OCASTTranslatorForEffect>>visitSequenceNode:
OrderedCollection>>do:
OCASTTranslatorForEffect>>visitSequenceNode:
RBSequenceNode>>acceptVisitor:
OCASTTranslatorForEffect(RBProgramNodeVisitor)>>visitNode:
OCASTTranslatorForEffect(OCASTTranslator)>>visitNode:
OCASTTranslatorForEffect(OCASTTranslator)>>visitInlinedBlockNode:
OCASTTranslatorForEffect>>emitIfTrue:
OCASTTranslatorForEffect(OCASTTranslator)>>visitMessageNode:
RBMessageNode>>acceptVisitor:
OCASTTranslatorForEffect(RBProgramNodeVisitor)>>visitNode:
OCASTTranslatorForEffect(OCASTTranslator)>>visitNode:
[:each | self visitNode: each] in OCASTTranslatorForEffect>>visitSequenceNode:
OrderedCollection>>do:
OCASTTranslatorForEffect>>visitSequenceNode:
RBSequenceNode>>acceptVisitor:
OCASTTranslatorForEffect(RBProgramNodeVisitor)>>visitNode:
OCASTTranslatorForEffect(OCASTTranslator)>>visitNode:
OCASTTranslator>>visitMethodNode:
RBMethodNode>>acceptVisitor:
OCASTTranslator(RBProgramNodeVisitor)>>visitNode:
OCASTTranslator>>visitNode:
RBMethodNode>>generateIR
RBMethodNode>>generate:
RBMethodNode>>generateMethod
OpalCompiler>>compileMethodFromAST
OCMethodSemanticScope>>compileMethodFromASTBy:
[
		self parse.
		self semanticScope compileMethodFromASTBy: self
	] in OpalCompiler>>compile
FullBlockClosure(BlockClosure)>>on:do:
OpalCompiler>>compile
MethodAddition>>createCompiledMethod
MCMethodDefinition>>addMethodAdditionTo:
[ :each | each addMethodAdditionTo: methodAdditions ] in MCPackageLoader>>basicLoadDefinitions
[ :each | | newLabel |
			"Special handling for first and last element"
			(count = 0 or: [ count + 1 = size or: [(Time millisecondsSince: lastUpdate) >= msecs]]) 
				ifTrue: [ 
					bar current: count.
					oldLabel = (newLabel := (labelBlock cull: each) ifNil: [oldLabel]) 
						ifFalse: [
							bar label: newLabel.
							oldLabel := newLabel ].
				lastUpdate := Time millisecondClockValue ].
			aBlock value: each.
			count := count + 1 ] in [:bar |
		labelBlock := aStringOrBlock isString
			ifTrue: [
				bar label: aStringOrBlock.
				[ :dummyItem | aStringOrBlock] ]
			ifFalse: [ aStringOrBlock ].

		self do: [ :each | | newLabel |
			"Special handling for first and last element"
			(count = 0 or: [ count + 1 = size or: [(Time millisecondsSince: lastUpdate) >= msecs]]) 
				ifTrue: [ 
					bar current: count.
					oldLabel = (newLabel := (labelBlock cull: each) ifNil: [oldLabel]) 
						ifFalse: [
							bar label: newLabel.
							oldLabel := newLabel ].
				lastUpdate := Time millisecondClockValue ].
			aBlock value: each.
			count := count + 1 ] ] in OrderedCollection(Collection)>>do:displayingProgress:every:
OrderedCollection>>do:
[:bar |
		labelBlock := aStringOrBlock isString
			ifTrue: [
				bar label: aStringOrBlock.
				[ :dummyItem | aStringOrBlock] ]
			ifFalse: [ aStringOrBlock ].

		self do: [ :each | | newLabel |
			"Special handling for first and last element"
			(count = 0 or: [ count + 1 = size or: [(Time millisecondsSince: lastUpdate) >= msecs]]) 
				ifTrue: [ 
					bar current: count.
					oldLabel = (newLabel := (labelBlock cull: each) ifNil: [oldLabel]) 
						ifFalse: [
							bar label: newLabel.
							oldLabel := newLabel ].
				lastUpdate := Time millisecondClockValue ].
			aBlock value: each.
			count := count + 1 ] ] in OrderedCollection(Collection)>>do:displayingProgress:every:
FullBlockClosure(BlockClosure)>>cull:
[ ^ block cull: self ] in [ self prepareForRunning.
	  CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run
[ activeProcess
			psValueAt: index
			put: anObject.
		aBlock value ] in CurrentJob(DynamicVariable)>>value:during:
FullBlockClosure(BlockClosure)>>ensure:
CurrentJob(DynamicVariable)>>value:during:
CurrentJob class(DynamicVariable class)>>value:during:
[ self prepareForRunning.
	  CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run
FullBlockClosure(BlockClosure)>>ensure:
Job>>run
MorphicUIManager(UIManager)>>displayProgress:from:to:during:
ByteString(String)>>displayProgressFrom:to:during:
OrderedCollection(Collection)>>do:displayingProgress:every:
OrderedCollection(Collection)>>do:displayingProgress:
MCPackageLoader>>basicLoadDefinitions
[self basicLoadDefinitions] in MCPackageLoader>>basicLoad
[ aBlock value ] in SourceFileArray>>deferFlushDuring:
FullBlockClosure(BlockClosure)>>ensure:
SourceFileArray>>deferFlushDuring:
MCPackageLoader>>basicLoad
[self basicLoad] in MCPackageLoader>>loadWithNameLike:
FullBlockClosure(BlockClosure)>>ensure:
MCPackageLoader>>useChangeSetNamed:during:
MCPackageLoader>>useNewChangeSetNamedLike:during:
MCPackageLoader>>loadWithNameLike:
MCVersionLoader>>basicLoadWithNameLike:
[ self basicLoadWithNameLike: aString ] in MCVersionLoader>>loadWithNameLike:
[ returnValue := aBlock value ] in [ 
		[ returnValue := aBlock value ] ensure: [ 
			self announceLoadStop: aString ] ] in MCVersionLoader>>announceLoad:do:
FullBlockClosure(BlockClosure)>>ensure:
[ 
		[ returnValue := aBlock value ] ensure: [ 
			self announceLoadStop: aString ] ] in MCVersionLoader>>announceLoad:do:
FullBlockClosure(BlockClosure)>>ensure:
MCVersionLoader>>announceLoad:do:
MCVersionLoader>>loadWithNameLike:
[ self ensurePackage: version package.
		  self loadWithNameLike: version info name ] in [   
		| version |
		version := versions first. 
		[ self ensurePackage: version package.
		  self loadWithNameLike: version info name ] asJob
				title: 'Loading ', version info name asString;
				run ] in MCVersionLoader>>load
@edenworky
Copy link
Author

The same happens when installing version 1.4.0 directly:

Metacello new
 	baseline: 'OSSubprocess';
 	repository: 'github://pharo-contributions/OSSubprocess:v1.4.0/repository';
	load.

@MarcusDenker
Copy link

in OCASTTranslator>>#visitBlockNode: we check for "aBlockNode numArgs < 4 "

(self compilationContext optionConstantBlockClosure and: [aBlockNode isConstant and: [ aBlockNode numArgs < 4  ]]) ifTrue: [ ^ self visitConstantBlockNode: aBlockNode].

this means that #visitConstantBlockNode: can not be called with more than 3 arguments.

Can you check the the method OCASTTranslator>>#visitBlockNode: in your Pharo?

(I tried just now in a fresh download of Pharo11, and it loads without error)

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

2 participants