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

Add parameter in tools settings to show error/warning as Link #6270

Merged
merged 1 commit into from Mar 15, 2018

Conversation

Projects
None yet
5 participants
@DBS06

DBS06 commented Mar 5, 2018

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"

PHST
Add parameter in tools settings to show error/warning as Link
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
@theotherjimmy

Looks great! Thanks.

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Mar 5, 2018

@cmonr Are we in a CI freeze right now?

@cmonr

This comment has been minimized.

Contributor

cmonr commented Mar 5, 2018

@theotherjimmy Nope!

/morph build

@cmonr

This comment has been minimized.

Contributor

cmonr commented Mar 6, 2018

...
/morph build

@cmonr

This comment has been minimized.

Contributor

cmonr commented Mar 6, 2018

Also, @DBS06, would you mind signing the CLA: https://developer.mbed.org/contributor_agreement/ ?

@DBS06

This comment has been minimized.

DBS06 commented Mar 6, 2018

Of course not, but I already did it ☺

@mbed-ci

This comment has been minimized.

mbed-ci commented Mar 6, 2018

Build : SUCCESS

Build number : 1370
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6270/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@DBS06

This comment has been minimized.

DBS06 commented Mar 7, 2018

I looked into the test which failed, but I didn't understand which assertion failed and why... :-(

@cmonr

This comment has been minimized.

Contributor

cmonr commented Mar 7, 2018

@DBS06 Thanks for taking a look. Unfortunately, this is an intermittent issue that we're still working to root cause.

/morph test

(Fyi @studavekar )

@DBS06

This comment has been minimized.

DBS06 commented Mar 8, 2018

@cmonr good to know, seems to be a really weird issue...

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Mar 8, 2018

/morph test
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@@ -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']

This comment has been minimized.

@cmonr

cmonr Mar 15, 2018

Contributor

@theotherjimmy Is this the right location for this new variable to be defined?

This comment has been minimized.

@theotherjimmy

theotherjimmy Mar 15, 2018

Contributor

Yes.

This comment has been minimized.

@theotherjimmy

theotherjimmy Mar 15, 2018

Contributor

_ENV_PATHS should be named _ENV_PARAMETERS or similar.

This comment has been minimized.

@cmonr

cmonr Mar 15, 2018

Contributor

Neat. We'll save that renaming for a separate PR.

This comment has been minimized.

@DBS06

DBS06 Mar 15, 2018

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.

@cmonr cmonr added needs: review and removed ready for merge labels Mar 15, 2018

@cmonr cmonr merged commit 0828727 into ARMmbed:master Mar 15, 2018

19 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Local events testing has passed
Details
travis-ci/littlefs Passed, code size is 10060B (+0.00%)
Details
travis-ci/mbed2-ATMEL Local mbed2-ATMEL testing has passed
Details
travis-ci/mbed2-MAXIM Local mbed2-MAXIM testing has passed
Details
travis-ci/mbed2-NORDIC Local mbed2-NORDIC testing has passed
Details
travis-ci/mbed2-NUVOTON Local mbed2-NUVOTON testing has passed
Details
travis-ci/mbed2-NXP Local mbed2-NXP testing has passed
Details
travis-ci/mbed2-RENESAS Local mbed2-RENESAS testing has passed
Details
travis-ci/mbed2-SILICON_LABS Local mbed2-SILICON_LABS testing has passed
Details
travis-ci/mbed2-STM Local mbed2-STM testing has passed
Details
travis-ci/tools Local tools testing has passed
Details

@cmonr cmonr removed the needs: review label Mar 15, 2018

DBS06 pushed a commit to evva-sfw/mbed-os that referenced this pull request May 23, 2018

PHST
Extend show error/warning as Link
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment