How to initialize a TruffleLanguage was Getting delegate of an EngineTruffleObject

Christian Humer christian.humer at gmail.com
Fri Jun 9 09:39:14 UTC 2017


Hi Vlad,

Indeed. The annotation processor should complain about that with a 
warning.

Thanks Stefan for helping out.


- Christian Humer

On 09.06.2017 11:00:16, "Vlad Vergu" <v.vergu at gmail.com> wrote:

>Hi Stefan,
>
>>  On 9 Jun 2017, at 11:52, Stefan Marr <java at stefan-marr.de> wrote:
>>
>>  Hi Vlad:
>>
>>>  On 9 Jun 2017, at 10:44, Vlad Vergu <v.vergu at gmail.com> wrote:
>>>
>>>  When I create a RootNode in the implementation of 
>>>TruffleLanguage#parse(ParsingRequest) an IllegalArgumentException is 
>>>thrown with message ‘Truffle language instance is not initialized’. 
>>>The language class has a @TruffleLanguage.Registration. What should i 
>>>be doing to initialize the language? Thanks.
>>
>>  Sounds familiar.
>>  Don’t remember the exact details thought.
>>
>>  I presume, you reached parse() via an eval() call on the polyglot 
>>engine?
>
>Indeed
>
>>  Make sure you don’t have the singleton instance of the language 
>>around anymore, I think that interfered with initialization in my 
>>case.
>>  And make sure that the instance of your language is the correct one.
>
>Thanks. Removing the singleton instance of language solved this issue. 
>It looks like the build was applying some older annotation processor 
>which complained when the singleton instance was missing.
>
>Best regards,
>Vlad



More information about the graal-dev mailing list