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

Support Modules in all hosts #20

Open
3 of 10 tasks
bterlson opened this issue Jun 26, 2017 · 9 comments
Open
3 of 10 tasks

Support Modules in all hosts #20

bterlson opened this issue Jun 26, 2017 · 9 comments
Assignees

Comments

@bterlson
Copy link
Member

bterlson commented Jun 26, 2017

Various console hosts now support modules, and some browsers do as well. Need implementations for every agent subclass. Here's a checklist:

  • ChakraCore
  • SpiderMonkey
  • V8
  • JSC
  • Node
  • Nashorn
  • Safari
  • Chrome
  • Edge
  • Firefox

/cc @phistuck, @dilijev

@bterlson
Copy link
Member Author

In the following branch I have preliminary support for ChakraCore and SpiderMonkey: https://github.com/bterlson/eshost/tree/module-support (specifically, 6feab85). I say preliminary because I have yet to hook up test262-harness and I'm not entirely sure how ChakraCore support is going to work considering it will only ever load from CWD rather than relative to the current module.

@dilijev
Copy link
Collaborator

dilijev commented Jul 5, 2017

@Cellule had some thoughts about ChakraCore's WScript file-loading functions and CWD.

@Cellule
Copy link

Cellule commented Jul 5, 2017

chakra-core/ChakraCore#3284 is adressing this particular problem.
I hope, once merged, we could leverage the same mechanism for WScript.LoadScriptFile / WScript.LoadModuleFile

@rwaldron rwaldron self-assigned this Jun 7, 2018
@rwaldron
Copy link
Contributor

rwaldron commented Jun 7, 2018

Update:

@dilijev
Copy link
Collaborator

dilijev commented Jun 7, 2018

@Cellule was there ever a PR addressing the CWD issue?

@rhuanjl
Copy link

rhuanjl commented Jun 8, 2018

@dilijev 3284 which Cellule linked above was a PR to resolve the CWD issue.

It was merged but the behaviour was reverted later possibly by mistake.

The test for the behaviour was disabled due to triggering an unrelated nullptr read, and all other module tests had all files in the same folder. So nothing in the test suite was dependent on how module paths were resolved at the time the behaviour was reverted back to be by CWD.

@rwaldron
Copy link
Contributor

rwaldron commented Jun 8, 2018

@dilijev Instead of relying on WScript APIs for handling, I've opened a feature request for a new flag: Test262/eshost runtime feature request: -module flag for ch #5274. That feature appears to be moving swiftly.

@rhuanjl
Copy link

rhuanjl commented Jun 8, 2018

@rwaldron dilijev’s concern is still relevant - it’s the same point I mentioned on the CC issue about path resolving in ch if modules have dependencies in different folders. It may be n/a for test262 but it’s potentially very relevant for other uses of eshost.

@dilijev
Copy link
Collaborator

dilijev commented Jun 8, 2018

Also concerned for non-module loading. WScript.LoadScriptFile etc is relative to CWD without any way to get or force loading relative to the script dir.

But that's out of scope of this issue.

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

5 participants