Skip to content

process: add shebang parser supports#379

Merged
yorkie merged 8 commits intomasterfrom
add/shebang
Oct 21, 2018
Merged

process: add shebang parser supports#379
yorkie merged 8 commits intomasterfrom
add/shebang

Conversation

@yorkie
Copy link
Copy Markdown
Member

@yorkie yorkie commented Oct 19, 2018

Checklist
  • npm test passes(failed on an unrelated suite)
  • tests and/or benchmarks are included
  • documentation is changed or added

This adds the shebang feature that makes the script could be an executable file. BTW, this adds the jerry tests into our CI tests set, too.

And now it fails on deps/jerry/tests/jerry/regression-test-issue-2105.js:

/* Check properties of global object */
assert(Object.keys(this) == "assert,gc,print,a,fail,fail_two");

@algebrait The actual this in global is: assert,gc,print,heapdump,a,fail,fail_two, so I guess #240 should be relevant with this issue.

Before merging this, we have to resolve the jerry tests failure at first.

This added jerry tests into Travis scripts.
Copy link
Copy Markdown
Contributor

@algebrait algebrait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shebang is not a part of ECMA spec.
Would you plz implement it in ShadowNode?
In fact, Node.js call stripShebang before wrap source code.

@yorkie
Copy link
Copy Markdown
Member Author

yorkie commented Oct 20, 2018

Thanks @algebrait, I have moved the implementation into Node.js runtime, and let's revisit the jerry tests in another PR :)

@yorkie yorkie changed the title jerry: add shebang parser supports process: add shebang parser supports Oct 20, 2018
@yorkie yorkie added process and removed jerry labels Oct 20, 2018

#!/usr/bin/env fail

// this should be fail No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing eof :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linter has been disabled in our test directory, which is not very convenient to detect code flaws and auto-format with linter. It has to be reconsidered how we apply the lint to the tests.

@yorkie yorkie merged commit 72c3efc into master Oct 21, 2018
@yorkie yorkie deleted the add/shebang branch October 21, 2018 12:12
yorkie added a commit that referenced this pull request Oct 24, 2018
qile222 pushed a commit that referenced this pull request Oct 27, 2018
* master:
  build: use CMAKE_INSTALL_PREFIX instead of custom install command (#391)
  child_process: introduce binary protocol to optimizing performance (#393)
  iotjs: cache parsed dump table for error.stack at runtime (#392)
  jerry: merge a59cf4f from upstream to optimize the function call (#381)
  promise: optimize the performance on .then and static resolve (#385)
  jerry: set prototype/constructor for external functions (#386)
  process: add shebang parser supports (#379)
  napi: fix complete callback segv/ticks on async-work (#380)
  jerry: pass regression-test-issue-2105 for heapdump (#382)
  tls, mqtts: fix connection not be actively disconnected (#375)
  websocket: fix the crash due to http exception (#376)
  process: add signal events support (#372)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants