-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Enable click to go to error in console #5624
Conversation
I thought VS Code supported this without a full path, assuming the path matches the workspace folder opened in VS Code. Does it need to be prefixed with |
Sorry I don't follow you? What's the thing that is prefixed with I see the same path webpack outputs repeated with Feel like I've missed your meaning? (I'm on my phone - perhaps GitHub is hiding something from me 😄) |
Sorry, I can try to explain better! I thought VSCode supported "Click to open" with relative paths, i.e. I'm all good for adding |
Yeah, vscode supports relative paths in its terminal. You don't need the leading |
Awesome! Only problem: how do I get the workspace location in the context of the Can I depend upon |
I think |
Thanks - I'll experiment with that and report back |
@johnnyreilly import |
cheers @Timer - will have a play |
Hey @Timer, I've made the suggested change; here's what it looks like with it in place: |
Looking good! Perhaps we should strip the leading slash? |
We need to somehow morph this path with the (above) highlighted line. |
Yeah could do
I would love to do that! Alas, unless I've misunderstood things, the (above) highlighted line is not part of the formatter output. It's emitted by webpack I think. Do you know a way to control that? |
We control that output here: We should be able to teach it the necessary trick there. :-) |
Nice, nice! Will experiment... |
Hmmm... There's a number of call sites. Should be fine:
Should be fine, this file already imports
But I'm not sure how to make this work nicely:
Any ideas? |
The issue being the way
Is there a nice way that |
@ianschmitz / @Timer - any thoughts on how I can advance this? |
Hey @johnnyreilly, I'm a little tight on time right now so I need to defer to some other collaborators. I'm very interested in moving this forward though (and will get around to it eventually if someone else doesn't). |
That's cool @Timer - when you're ready then let me know! |
Yeah I've been looking at it for a little while - this is a tricky one... Taking a step back, could we do something as simple as stripping out everything before |
Sounds possible; like you I've no idea of the answers to the questions. |
@johnnyreilly As I understand this PR only deals with TypeScript, shouldn't we also use Also it's probably better to use BTW you might be interested in how they did it in TSLint: palantir/tslint#3491 |
This should cater for both
In my experience the |
But I'd need to eject for that, right? I'll better try to convince iTerm maintainers to support |
if anyone interested, iTerm2 now supports |
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
I'd quite like to get this in - I'm waiting on advice on how to take this forward. |
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
Could someone advise on how we could take this forward please? |
I've taken a look at We can create a separate issue to figure out a better way where we can use |
Cool - when I get a moment I'll give it a go! |
…HotDevClient uses process.cwd() as discussed with @ianschmitz
okay - merging is a world of pain. I regret even attempting this. I'll fork and apply my changes to that |
Closing in favour of #6502 |
At present when using CRA with TypeScript, you can click on an error in the console and go to the erroring file. This is great!
What would be even better, is if you went directly to the line and column where the error is happening like this:
This PR enables this by augmenting the output in the
typescriptFormatter
. There is some duplication in the console as webpack already displays the filepath alone.Certainly for myself, I'd take this duplication to unlock the ability to click and go directly to an error. (This is what the default formatter in
fork-ts-checker-webpack-plugin
does.)What do you think?