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

Visual Studio Code "gpr-aware" problemMatcher ? #541

Closed
JHag6694 opened this issue Sep 10, 2020 · 8 comments
Closed

Visual Studio Code "gpr-aware" problemMatcher ? #541

JHag6694 opened this issue Sep 10, 2020 · 8 comments

Comments

@JHag6694
Copy link

Hi
Start to evaluate ALS using the Visual Studio Code extension.
In the build task provided , problemMatcher is set to "$ada"

If I use the same task with my own projects, it sems that it will only let me jump to the correct file/line when the build task displays an error if .gpr and .adb are in the same folder - as only the source file base name is displayed and problemMatcher is not "gpr-aware"

Am I right or did I miss something ?

@setton
Copy link
Member

setton commented Sep 15, 2020

You're right @JHag6694 - at the moment I would pass -gnatef to gprbuild to emit full paths in error messages, this should work until a project-aware problemMatcher is implemented.

@JHag6694
Copy link
Author

JHag6694 commented Oct 8, 2020

Thanks @setton for the option. Works fine

@terids
Copy link

terids commented Jan 29, 2021

I'm was having the same issue, but adding -gnatef to my build args doubles up my path as in the image..

screenshot1709

Any hint as to what I can change to get the problem matcher working correctly? This is my tasks.json..

screenshot1710

Thanks for the great plugin! :)

@setton
Copy link
Member

setton commented Jan 29, 2021

Hello @terids - unfortunately this doesn't exist yet - we will need to write some code that processes the .gpr file and gets the list of file from it, in order to match base name to file name... we plan to work on this, but we don't have a date in mind yet.

@JHag6694
Copy link
Author

Hello @terids
If you use -gnatef, you should use a problemMatcher where fileLocation is set to absolute.

Here attached, you will find my tasks.json which is working fine.

tasks.json.txt

@terids
Copy link

terids commented Jan 30, 2021

@JHag6694 the absolute path did it for me, thanks so much for that :)

reznikmm added a commit that referenced this issue Mar 13, 2021
and fix examples by adding `-gnatef` to `tasks.json`
Refs #541
reznikmm added a commit that referenced this issue Mar 13, 2021
and fix examples by adding `-gnatef` to `tasks.json`
Refs #541
reznikmm added a commit that referenced this issue Mar 31, 2021
reznikmm added a commit that referenced this issue Apr 1, 2021
@reznikmm
Copy link
Contributor

reznikmm commented Apr 2, 2021

I've added a "auto-detected tasks" that work well with "$ada" problem matcher using absolute file names (-gnatef option):

out.mp4

@reznikmm
Copy link
Contributor

reznikmm commented Nov 2, 2021

I think this works now (with -gnatef help).

@reznikmm reznikmm closed this as completed Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants