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

lib: replace --diagnostic-report-* with --report-* #27312

Closed
wants to merge 3 commits into from

Conversation

joyeecheung
Copy link
Member

@joyeecheung joyeecheung commented Apr 19, 2019

In the code base the word report is almost only used to refer to
the diagnostic report when it's a noun, and its programmable
interface process.report() is not prefixed, so report should be
unambiguous enough to use without diagnostic.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

In the code base the word `report` is almost only used to refer to
the diagnostic report when it's a noun, and it's programmable
interface `process.report()` it not prefixed, so `report` should be
unambiguous enough to use without `diagnostic`.
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Apr 19, 2019
@joyeecheung
Copy link
Member Author

cc @nodejs/diagnostics

@nodejs-github-bot
Copy link
Collaborator

@mscdex
Copy link
Contributor

mscdex commented Apr 19, 2019

I wonder if for consistency this might be a good time to change a couple of the flag suffixes to something shorter like in #27306, i.e. --report-dir and --report-name, instead of --report-directory and --report-filename respectively?

@joyeecheung
Copy link
Member Author

@mscdex I think --report-dir makes sense considering we already have --icu-data-dir, --report-filename is triciker, because we don't have precedence. Another thing to take into account is:

path.format({dir: 'test', 'name': 'report.json'});  // test/report.json on UNIX
path.parse('test/report.json');
// { root: '',
//  dir: 'test',
//  base: 'report.json',
//  ext: '.json',
//  name: 'report' }

And, the API of process.report() still takes directory and filename. I think we could leave that to a separate patch to discuss and make sure we have a configuration format consistent with what we have in core? Report is still experimental, so there is no need to rush yet.

doc/api/cli.md Outdated Show resolved Hide resolved
doc/api/cli.md Outdated Show resolved Hide resolved
doc/api/cli.md Outdated Show resolved Hide resolved
Co-Authored-By: joyeecheung <joyeec9h3@gmail.com>
@nodejs-github-bot
Copy link
Collaborator

@joyeecheung joyeecheung added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 22, 2019
@nodejs-github-bot
Copy link
Collaborator

@joyeecheung
Copy link
Member Author

Landed in 94adfe9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants