GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — process: correctly parse Unicode in NODE_OPTIONS by bzoz · Pull Request #34476 · nodejs/node

Conversation

@bzoz

@bzoz bzoz commented Jul 22, 2020

Copy link
Copy Markdown
Contributor

Fixes an issue on Windows, where Unicode in NODE_OPTIONS was not parsed
correctly.

Fixes: #34399

Reused the code from node_env_var.cc for getting the enviroment variable value.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Jul 22, 2020
@nodejs-github-bot

nodejs-github-bot commented Jul 22, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/32470/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

addaleax
addaleax approved these changes Jul 22, 2020
View reviewed changes
jasnell
jasnell approved these changes Jul 22, 2020
View reviewed changes
@nodejs-github-bot

nodejs-github-bot commented Jul 22, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/32475/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

devsnek
devsnek approved these changes Jul 22, 2020
View reviewed changes
lundibundi
lundibundi approved these changes Jul 22, 2020
View reviewed changes
Comment thread test/parallel/test-unicode-node-options.js Outdated
Comment on lines 11 to 20

@lundibundi lundibundi Jul 22, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Nit:

Suggested change
const NODE_OPTIONS = `--redirect-warnings=${expected_redirect_value}`;
const result = cp.spawnSync(process.argv0,
['--expose-internals', __filename, 'test'],
{
env: {
NODE_OPTIONS
}
});
const env = { NODE_OPTIONS: `--redirect-warnings=${expected_redirect_value}` };
const result = cp.spawnSync(process.argv0,
['--expose-internals', __filename, 'test'],
{ env });

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/parallel/test-unicode-node-options.js Outdated

@lundibundi lundibundi Jul 22, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Is this necessary?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

himself65 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread test/parallel/test-unicode-node-options.js Outdated

@lundibundi lundibundi Jul 22, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Nit: I'd prefer to have explicit check for 'child process' case (i.e. if (process.argv[2] === 'test') {) instead to handle possibly different test start args.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/parallel/test-unicode-node-options.js Outdated

@lundibundi lundibundi Jul 22, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
const result = cp.spawnSync(process.argv0,
const result = cp.spawnSync(process.execPath,

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

himself65 and richardlau reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
This was referenced Jul 23, 2020
CI Relability 2020-07-23 JaneaSystems/nodejs-reliability#46
Open
CI Relability 2020-07-24 JaneaSystems/nodejs-reliability#47
Open
@bzoz
bzoz force-pushed the unicode-node-options branch from f5f8a79 to 1a31d81 Compare August 12, 2020 13:46
@nodejs-github-bot

nodejs-github-bot commented Aug 12, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/32745/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bzoz

bzoz commented Aug 12, 2020

Copy link
Copy Markdown
Contributor Author

Fixed some nits and rebased.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Aug 13, 2020
CI Relability 2020-08-13 JaneaSystems/nodejs-reliability#67
Open
CI Reliability 2020-08-13 nodejs/reliability#42
Open
@nodejs-github-bot

nodejs-github-bot commented Aug 13, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/32755/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Aug 14, 2020
CI Relability 2020-08-14 JaneaSystems/nodejs-reliability#68
Open
CI Reliability 2020-08-14 nodejs/reliability#43
Open
CI Reliability 2020-08-15 nodejs/reliability#44
Open
CI Reliability 2020-08-16 nodejs/reliability#45
Open
CI Reliability 2020-08-17 nodejs/reliability#46
Open
CI Reliability 2020-08-18 nodejs/reliability#47
Open
@bzoz

bzoz commented Aug 20, 2020

Copy link
Copy Markdown
Contributor Author

Ok, this is weird. This fails only on ubuntu1804_sharedlibs_openssl111_x64 with this error message:

ot ok 2466 parallel/test-unicode-node-options
  ---
  duration_ms: 0.144
  severity: fail
  exitcode: 1
  stack: |-
    out/Release/node: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_1b' not found (required by out/Release/node)
    assert.js:103
      throw new AssertionError(obj);
      ^
    
    AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
    
    1 !== 0
    
        at Object.<anonymous> (/home/iojs/build/workspace/node-test-commit-linux-containered/test/parallel/test-unicode-node-options.js:18:10)
        at Module._compile (internal/modules/cjs/loader.js:1089:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1110:10)
        at Module.load (internal/modules/cjs/loader.js:954:32)
        at Function.Module._load (internal/modules/cjs/loader.js:795:14)
        at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
        at internal/main/run_main_module.js:17:47 {
      generatedMessage: true,
      code: 'ERR_ASSERTION',
      actual: 1,
      expected: 0,
      operator: 'strictEqual'
    }
  ...

It looks like other tests can spawn new Node instances just fine. I'm stuck here 🤔

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cjihrig
cjihrig reviewed Aug 20, 2020
View reviewed changes
Comment thread test/parallel/test-unicode-node-options.js Outdated

@cjihrig cjihrig Aug 20, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Does this help with the current CI failure?

Suggested change
env: { NODE_OPTIONS },
env: { ...process.env, NODE_OPTIONS },

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@bzoz bzoz Aug 20, 2020

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Yes, it helped. Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cjihrig reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
bzoz added 5 commits August 20, 2020 03:42
@bzoz
process: correctly parse Unicode in NODE_OPTIONS
12d0405
Fixes an issue on Windows, where Unicode in NODE_OPTIONS was not parsed
correctly.

Fixes: nodejs#34399
@bzoz
fixup: linter
7b15fa7
@bzoz
fixup: nits
c88bb39
@bzoz
fixup: add logging
aa20c6f
@bzoz
fixup: also pass env
15ac48a
@bzoz
bzoz force-pushed the unicode-node-options branch from 398d7d5 to 15ac48a Compare August 20, 2020 01:46
@bzoz

bzoz commented Aug 20, 2020

Copy link
Copy Markdown
Contributor Author

Rebased CI: https://ci.nodejs.org/job/node-test-pull-request/32863/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bzoz added a commit to JaneaSystems/node that referenced this pull request Aug 20, 2020
@bzoz
process: correctly parse Unicode in NODE_OPTIONS
de565ad
Fixes an issue on Windows, where Unicode in NODE_OPTIONS was not parsed
correctly.

Fixes: nodejs#34399

PR-URL: nodejs#34476
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
@bzoz

bzoz commented Aug 20, 2020

Copy link
Copy Markdown
Contributor Author

Green CI, landed in de565ad

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bzoz bzoz closed this Aug 20, 2020
BethGriggs pushed a commit that referenced this pull request Aug 20, 2020
@bzoz @BethGriggs
process: correctly parse Unicode in NODE_OPTIONS
fd6efbe
Fixes an issue on Windows, where Unicode in NODE_OPTIONS was not parsed
correctly.

Fixes: #34399

PR-URL: #34476
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
@danielleadams danielleadams mentioned this pull request Aug 20, 2020
V14.9.0 proposal #34852
Merged
BethGriggs pushed a commit that referenced this pull request Aug 20, 2020
@bzoz @BethGriggs
process: correctly parse Unicode in NODE_OPTIONS
a16f0f4
Fixes an issue on Windows, where Unicode in NODE_OPTIONS was not parsed
correctly.

Fixes: #34399

PR-URL: #34476
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
@bzoz @addaleax
process: correctly parse Unicode in NODE_OPTIONS
14c7502
Fixes an issue on Windows, where Unicode in NODE_OPTIONS was not parsed
correctly.

Fixes: #34399

PR-URL: #34476
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
@bzoz @addaleax
process: correctly parse Unicode in NODE_OPTIONS
53eae0d
Fixes an issue on Windows, where Unicode in NODE_OPTIONS was not parsed
correctly.

Fixes: #34399

PR-URL: #34476
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
@codebytere codebytere mentioned this pull request Sep 28, 2020
v12.19.0 proposal #35401
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cjihrig cjihrig cjihrig left review comments
@jasnell jasnell jasnell approved these changes
@addaleax addaleax addaleax approved these changes
+2 more reviewers
@devsnek devsnek devsnek approved these changes
@lundibundi lundibundi lundibundi approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Unicode characters are not properly parsed from NODE_OPTIONS on Windows

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@bzoz @nodejs-github-bot @jasnell @addaleax @cjihrig @devsnek @lundibundi
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.