Skip to content

Commit

Permalink
remote compiler fix to be compatible with Pharo 8
Browse files Browse the repository at this point in the history
  • Loading branch information
dionisiydk committed Apr 8, 2020
1 parent 6baebbf commit 2200377
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Seamless-GTSupport/SeamlessRemoteClassCompiler.class.st
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Class {
#name : #SeamlessRemoteClassCompiler,
#superclass : #OpalCompiler,
#category : 'Seamless-GTSupport'
#category : #'Seamless-GTSupport'
}

{ #category : #evaluation }
Expand All @@ -21,6 +21,10 @@ SeamlessRemoteClassCompiler >> evaluate [
ifFalse: [ self class: (context
ifNil: [ receiver remoteClass ]
ifNotNil: [ context method methodClass ])].
(compilationContext respondsTo: #productionEnvironment:) ifTrue: [
"Compatibility with Pharo 8"
compilationContext productionEnvironment: self class environment].

self noPattern: true.
selectedSource := ((self compilationContext requestor respondsTo: #selection)
and: [
Expand All @@ -29,7 +33,7 @@ SeamlessRemoteClassCompiler >> evaluate [
ifTrue: [ itsSelectionString ]
ifFalse: [ source ].
self source: selectedSource.
doItMethod := self translate generateWithSource.
doItMethod := self translate methodNode generateWithSource.

value := receiver withArgs: (context ifNil: [ #() ] ifNotNil: [ {context} ]) executeMethod: doItMethod.
self compilationContext logged
Expand Down

0 comments on commit 2200377

Please sign in to comment.