Question about graal.js import resolution in polygot context [was Re: Graal embed documentation not in place]

Jerven Tjalling Bolleman jerven.bolleman at sib.swiss
Tue Aug 8 09:14:19 UTC 2017


Dear Graal devs,

I am really pleased with how smooth this experiment is going. Those 
snippets already helped a lot.

My first question is how are js imports resolved/supported inside a 
Graal.js/polyglot instance.

e.g.

Context context = context.create("js");
context.eval("js", "import {x} from 'y.js'");

currently it fails with.

SyntaxError: Unnamed:474:0 Expected an operand but found import
import x from y.js;out.print(render(taxon));

Suggests it is not (yet) supported.

This is not something that will block me from further experimentation 
but working imports would be nice to have.

Regards,
Jerven



On 08/07/2017 02:39 PM, Doug Simon wrote:
> We are currently working on extensive documentation for GraalVM but it's not yet ready for release.
> 
> You can find a draft of the embedding page at https://www.dropbox.com/s/ia4yoe2jh6viyzq/Embed%20Languages%20with%20the%20Graal%20Polyglot%20SDK.pdf?dl=0
> 
> Keep in mind that it's only a draft and may contain errors.
> 
> -Doug
> 
>> On 7 Aug 2017, at 12:49, Jerven Tjalling Bolleman <jerven.bolleman at sib.swiss> wrote:
>>
>> Dear Graal devs,
>>
>> Really love the work you are doing. I am just looking for some documentation.
>>
>> In the Graal OTN 0.26 release graalvm-0.26/examples/embed/README.md
>> file a location is mentioned where one should find graal embedding documentation.
>>
>> http://www.graalvm.org/docs/embed/
>>
>> However, this does not resolve at this time.
>>
>> Otherwise, the example in that directory was exactly what I was looking for!
>>
>> I did want to know if it is already possible to run graal.js on a JDK9-EA? Without graal if need be? for example by copying the trufflejs.jar and truffle.jar to a JDK9 classpath?
>>
>> Regards,
>> Jerven
>> -- 
>> -------------------------------------------------------------------
>> Jerven Bolleman                        Jerven.Bolleman at sib.swiss
>> SIB Swiss Institute of Bioinformatics  Tel: +41 (0)22 379 58 85
>> CMU, rue Michel Servet 1               Fax: +41 (0)22 379 58 58
>> 1211 Geneve 4,
>> Switzerland     www.sib.swiss - www.uniprot.org
>> Follow us at https://twitter.com/#!/uniprot
>> -------------------------------------------------------------------
> 

-- 
-------------------------------------------------------------------
Jerven Bolleman                        Jerven.Bolleman at sib.swiss
SIB Swiss Institute of Bioinformatics  Tel: +41 (0)22 379 58 85
CMU, rue Michel Servet 1               Fax: +41 (0)22 379 58 58
1211 Geneve 4,
Switzerland     www.sib.swiss - www.uniprot.org
Follow us at https://twitter.com/#!/uniprot
-------------------------------------------------------------------


More information about the graal-dev mailing list