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

Switch the pretty output to use colons to separate file:line:char so that lines are clickable in terminals #20736

Merged
merged 1 commit into from
Jan 5, 2018

Conversation

orta
Copy link
Contributor

@orta orta commented Dec 16, 2017

When tsc, with pretty enabled, gives an error messages they look like this:

source/commands/init/state-setup.ts(21,40): error TS2339: Property 'bold' does not exist on type 'typeof "/Users/orta/dev/projects/danger/danger-js/node_modules/chalk/types/index"'.

21     header: (msg: String) => say(chalk.bold("\n## " + msg + "\n")),

You cannot directly click onsource/commands/init/state-setup.ts(21,40): to jump directly to the line of code, which is ideal. The format, by convention, for that syntax is file:line:char - which this PR switches the message format to.

For example, most testing libraries will output in this format (though I think this just comes from node's exception handling, but you get the point)
screen shot 2017-12-16 at 5 52 08 pm


I couldn't find an issue for this, happy to write one up, but it seemed simple enough to just write a PR instead.

@thetrompf
Copy link

Actually the current format is clickable inside VScode, but this way it works both in sublime and atom. Unfortunately I cannot verify if this works in VSCode tonight, maybe someone else can verify it?

@orta
Copy link
Contributor Author

orta commented Dec 17, 2017

It does, yes:

screen shot 2017-12-17 at 5 37 11 pm

@thetrompf
Copy link

Cool! Carry on then :)

@DanielRosenwasser
Copy link
Member

@mjbvz @billti @mhegazy --pretty output was never meant to be parsed, but do VS/VS Code use it for anything right now?

@DanielRosenwasser
Copy link
Member

Sorry, the baselines are now out of date because I just merged in #20416.

@mjbvz
Copy link
Contributor

mjbvz commented Dec 19, 2017

@DanielRosenwasser The VS Code TS extension doesn't use --pretty

@orta orta force-pushed the use_colors_pretty_output branch 3 times, most recently from 17260b2 to 9c67064 Compare December 19, 2017 22:00
@orta
Copy link
Contributor Author

orta commented Dec 19, 2017

Cool - that should be it updated & rebased 👍

@billti
Copy link
Member

billti commented Dec 19, 2017

VS doesn't appear to use that option.

@mhegazy mhegazy merged commit 5865494 into microsoft:master Jan 5, 2018
@mhegazy
Copy link
Contributor

mhegazy commented Jan 5, 2018

thanks @orta! and sorry for the delay.

@orta
Copy link
Contributor Author

orta commented Jan 5, 2018

You're welcome, it was over the holidays, so low expectation 👍

@orta orta deleted the use_colors_pretty_output branch April 28, 2018 21:13
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants