FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

tools: add node-pty as a dependency by MoLow · Pull Request #47793 · nodejs/node · GitHub

/ node Public

tools: add node-pty as a dependency - #47793

Closed
MoLow wants to merge 2 commits into
nodejs:mainfrom
MoLow:pseudo-tty-tests
Closed

tools: add node-pty as a dependency#47793
MoLow wants to merge 2 commits into
nodejs:mainfrom
MoLow:pseudo-tty-tests

Conversation

MoLow commented Apr 30, 2023
edited
Loading

Copy link
Copy Markdown
Member

this is another followup for #47498 enabling running pseudo-tty snapshot tests using https://github.com/microsoft/node-pty
see #47793 (comment) for the reasoning behind this change

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/actions
  • @nodejs/gyp
  • @nodejs/test_runner

nodejs-github-bot added build Issues and PRs related to build files or the CI. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. labels Apr 30, 2023
MoLow force-pushed the pseudo-tty-tests branch 2 times, most recently from 8c96ecf to dc38eb4 Compare April 30, 2023 19:44

anonrig commented Apr 30, 2023
edited
Loading

Copy link
Copy Markdown
Member

@MoLow Can you add an eslint rule to inhibit requiring/using node-pty inside lib folder?

anonrig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

License file is missing

Comment thread test/common/assertSnapshot.js Outdated
Comment thread test/parallel/test-runner-output.mjs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can you add a comment to this line and explain what it does?

Comment thread test/parallel/test-runner-output.mjs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why did we have to change the ordering of this transform? Would it be helpful to document this with a comment?

Comment thread test/common/assertSnapshot.js Outdated
Comment thread test/common/assertSnapshot.js Outdated

mscdex commented May 1, 2023

Copy link
Copy Markdown
Contributor

To avoid confusion with actual deps/ directory changes, I think tools: would be a more appropriate commit message prefix.

MoLow commented May 1, 2023

Copy link
Copy Markdown
Member Author

License file is missing

I think that is relevant for deps, not for tools, see #47793 (comment)
(the license file itself exists but is not exposed, which is ok)

tniessen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Could you explain what problem node-pty solves here, and how it worked before?

Comment thread test/common/assertSnapshot.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Should probably be updated.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

why? it still returns Promise<void>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Huh, either GitHub or myself messed up the reference. I meant to select the entire doc comment, not just the @returns line. Specifically, shouldn't a @param be added?

MoLow commented May 1, 2023

Copy link
Copy Markdown
Member Author

Could you explain what problem node-pty solves here, and how it worked before?

Sure. the current pseudo-tty test suite uses an equivilent implementation for this from python:


as part of the effort of migrating the message tests to use common.assertSnapshot this will allow running as any other test under tests/parallel.

common.assertSnapshot has a few advantages over the current python snapshot tests (it is faster, the producing snapshots is not doen maually so it is both easier and deterministic)

MoLow force-pushed the pseudo-tty-tests branch from dc38eb4 to 5ddce6e Compare May 1, 2023 16:10

MoLow commented May 1, 2023

Copy link
Copy Markdown
Member Author

@nodejs/node-api any idea why the build is failing on mac? https://github.com/nodejs/node/actions/runs/4846084398/jobs/8635397424

Copy link
Copy Markdown
Member
                                      ^
../src/unix/pty.cc:669:10: error: use of undeclared identifier 'openpty'
  return openpty(amaster, aslave, name, (termios *)termp, (winsize *)winp);
         ^
../src/unix/pty.cc:717:10: error: use of undeclared identifier 'forkpty'
  return forkpty(amaster, name, (termios *)termp, (winsize *)winp);
         ^

mscdex changed the title deps: add node-pty as a dependency tools: add node-pty as a dependency May 1, 2023

MoLow commented May 1, 2023

Copy link
Copy Markdown
Member Author

closing in favor of #47803, wich is much simpler

MoLow closed this May 1, 2023
MoLow deleted the pseudo-tty-tests branch May 1, 2023 18:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL