How to initialize a TruffleLanguage was Getting delegate of an EngineTruffleObject

Vlad Vergu v.vergu at gmail.com
Fri Jun 9 09:00:16 UTC 2017


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