Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

External tools integration path filtering doesn't work in Windows #2451

Open
pbennett opened this issue Apr 11, 2016 · 8 comments
Open

External tools integration path filtering doesn't work in Windows #2451

pbennett opened this issue Apr 11, 2016 · 8 comments

Comments

@pbennett
Copy link

  • Plugin version 0.10.1264
  • RubyMine 8.0.3
  • Java version:1.8.073
  • Windows 10

I'm trying to set up an action to run go install ./... for my code tree so I can triage build errors as well as install libs for build dependency caching.
Speaking with Florin he said he set up an external tool to run go install, didn't set output filters and it worked fine with errors being clickable/etc. He asked me to create the issue here.

Under Windows, it runs fine, but the errors aren't parsed properly and not turned into links.
Setting up explicit output filter as $FILE_PATH$:$LINE$:$COLUMN$: doesn't work either.

@dlsniper
Copy link
Member

Hi, thanks for opening the issue. Please add the screenshot for how the tool is configured, tell where the project root is, what's the GOPATH value and finally a sample of the message that doesn't work (copy-pastable preferably). Than should help out. Thanks!

@pbennett
Copy link
Author

project root: d:\builds\tools_utils.latest_systest\pub\resources\golang
external_tool
nolinks
testtool_goodlinks

@pbennett
Copy link
Author

Test tool handles errors fine, external tool doesn't.

@pbennett pbennett reopened this Apr 11, 2016
@zolotov
Copy link
Contributor

zolotov commented Apr 11, 2016

Actually I don't know what you want we to do. Indeed, we have special code that make test tool create links in console relative to GOPATH roots. And external tool is something general, it's just about running some console tool, this thing doesn't know anything about go, GOPATH roots, format of error messages, etc.

@dlsniper
Copy link
Member

I've asked Patrick to open the issue as I wasn't aware of some aspects of this. The thing is that for me the IDE does correctly convert the paths to links. Should this rather be opened against the External Tools functionality? Can the plugin provide any filtering functionality? That's why O said it's better to have thr ticket here as there are far too many unknowns for me. Thanks.

@zolotov
Copy link
Contributor

zolotov commented Apr 11, 2016

Should this rather be opened against the External Tools functionality?

Ask IntelliJ team to support golang output in External Tools subsystem? I don't think so.

Can the plugin provide any filtering functionality?

In theory plugin can provide some filtering macro like $FILE_PATH$. In order to get GOPATH and GOROOT values the external tool still should know about the project/module though. You may want to investigate this possibility. If it's impossible the go plugin can provide its own external tools. As for me I think that both options bring not much but they look too expensive to implement.

@pbennett
Copy link
Author

Ask IntelliJ team to support golang output in External Tools subsystem? I don't think so.

Why would there be anything special about it? The problem is the external tool support and the output filters don't really 'work.' I should be able to specify something like '([^:]+):\d+:\d+ ' and have it match go's filename:line:column output (although how you define a regular expressionto actually match anything in output filters is completely undocumented in the filter help). $FILE_PATH$:$LINE$:$COLUMN$: should technically work as well - but it doesn't.
Apparently it always wants a full path? It should be able to resolve paths relative to the working directory of the external tool.

@zolotov
Copy link
Contributor

zolotov commented Apr 12, 2016

Why would there be anything special about it?

Because output of go tools is a mess, you can see how we handle them in build/tests/etc here https://github.com/go-lang-plugin-org/go-lang-idea-plugin/blob/master/src/com/goide/runconfig/GoConsoleFilter.java

Apparently it always wants a full path? It should be able to resolve paths relative to the working directory of the external tool.

You can vote for this issue, however notice that
even on your screenshot they are not paths relative to working directory

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants