-
Notifications
You must be signed in to change notification settings - Fork 3k
Add parameter in tools settings to show error/warning as Link #6270
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
Conversation
Per default mbed compile prints errors/warnings on output not in a link format, therefore it is not possible to click, i.e. in an IDE, on the errors/warnings and jump to the position in the file. The settings parameter lets you decide in witch format do you want to have it. If it is enabled then the output will look like: [Error/Warning] [absolute\path\to\file.ext]:[line]:[column]: [msg] with this format nearly every common known IDE can deal with this link and lets you jump to the file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks.
@cmonr Are we in a CI freeze right now? |
@theotherjimmy Nope! /morph build |
... |
Also, @DBS06, would you mind signing the CLA: https://developer.mbed.org/contributor_agreement/ ? |
Of course not, but I already did it ☺ |
Build : SUCCESSBuild number : 1370 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1021 |
Test : FAILUREBuild number : 1151 |
I looked into the test which failed, but I didn't understand which assertion failed and why... :-( |
@DBS06 Thanks for taking a look. Unfortunately, this is an intermittent issue that we're still working to root cause. /morph test (Fyi @studavekar ) |
@cmonr good to know, seems to be a really weird issue... |
/morph test |
Test : SUCCESSBuild number : 1176 |
@@ -74,7 +77,7 @@ | |||
# User Settings (env vars) | |||
############################################################################## | |||
_ENV_PATHS = ['ARM_PATH', 'GCC_ARM_PATH', 'GCC_CR_PATH', 'IAR_PATH', | |||
'ARMC6_PATH'] | |||
'ARMC6_PATH', 'PRINT_COMPILER_OUTPUT_AS_LINK'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@theotherjimmy Is this the right location for this new variable to be defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_ENV_PATHS
should be named _ENV_PARAMETERS
or similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat. We'll save that renaming for a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also wondered at typing this specific line of code, if this would be the right location :-) I also thought about it to rename the variable right away, but come to the conclusion that this should be a separate PR.
PR ARMmbed#6270 added a parameter which allows the user to decide in case of an error or warning to print the output as a link. This extension of this option also prints the ARM-GCC output in a link format.
Description
This feature increases the comfortability of the mbed-cli within an offline IDE.
It allows the developer to jump directly to the error/warning instead of searching for the file and position.
Per default, mbed compile prints errors/warnings on output not in a link format, therefore it is not possible to click, i.e. in an IDE, on the errors/warnings and jump to the position of the file, or even know where (path) it is.
This feature generates an absolute path, because some IDEs are not parsing relatives paths correctly (i.e. VSCode).
In the linked picture, a compare between the default compile output and the newly one with the link is visualized.
compare mbed compile output
It is possible to activate/deactive the feature by setting this define
PRINT_COMPILER_OUTPUT_AS_LINK = False
in the application specific "mbed_settings.py" to true
Status
READY
Migrations
I think nothing has to be changed, it just makes the error/warning output from "mbed-cli compile" more useful in an offline IDE.
NO
Steps to test or reproduce
Insert in the application specific "mbed_settings.py":
PRINT_COMPILER_OUTPUT_AS_LINK = True
Start mbed compile with:
mbed compile -t GCC_ARM
note: mcu (TARGET) must/should be configured in ".mbed"