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

[rush] Add support for new --print-log-file-paths parameter #4999

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

witcher112
Copy link
Contributor

Summary

As per #4998 , I've implemented #VSCode-1 proposal.

Details

Quote from #4998:

Since VSCode is able to detect file paths in the terminal as well as in the editor, it's possible to simply print the path to the generated log file so the developer would be able to access them just with Ctrl + Mouse Click.

Advantages:

  • easy to develop
  • could be opt-in (through argument like --print-log-paths)

Disadvantages: (I can't think of any)

How it was tested

I tested in on my project's repository. Here's screenshot:

image

Ctrl + Mouse Click opens the file in VSCode which is very convenient to check what failed.

Impacted documentation

https://rushjs.io/pages/commands/rush_build/
https://rushjs.io/pages/commands/rush_rebuild/

if (shouldPrintLogFilePaths) {
if (operationResult.status === OperationStatus.Failure && operationResult.logFilePaths !== undefined) {
terminal.writeLine('');
terminal.writeLine(Colorize.gray(`stdout: ${operationResult.logFilePaths.text}`));
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that this log contains both stdout and stderr.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I didn't know that.

In such case, I guess single line log file: xyz should be enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs triage
Development

Successfully merging this pull request may close these issues.

2 participants