Skip to content

Compiler errors/warnings report from build directory instead of source directory for included files. #1123

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

Closed
marsfan opened this issue Jan 2, 2021 · 2 comments
Assignees
Labels
conclusion: duplicate Has already been submitted

Comments

@marsfan
Copy link

marsfan commented Jan 2, 2021

Bug Report

Current behavior

 .\arduino-cli.exe compile -v --config-file .\atp.yaml -b=SparkFun:apollo3:sfe_artemis_atp:svl_baud=921600,loader=option_svl D:\Desktop\test\test.ino

Errors and warnings produced by the compiler provide the path to the files in the temp directory instead of the actual file location.
Example warning output.

C:\Users\Gabe\AppData\Local\Temp\arduino-sketch-D96E63BC1A299C47BBA385C4BB083A65\sketch\src\leptonSDK\FLIR_I2C.cpp: In function 'LEP_RESULT DEV_I2C_MasterWriteData(LEP_UINT16, LEP_UINT8, LEP_UINT16, LEP_UINT16*, LEP_UINT16, LEP_UINT16*, LEP_UINT16*)':
C:\Users\Gabe\AppData\Local\Temp\arduino-sketch-D96E63BC1A299C47BBA385C4BB083A65\sketch\src\leptonSDK\FLIR_I2C.cpp:254:59: error: call of overloaded 'write(LEP_UINT8*&, LEP_INT32&)' is ambiguous
     bytesActuallyWritten = Wire.write(txdata, bytesToWrite);
                                                           ^

Expected behavior

Warnings for included files should instead point to the actual source file.

Example Corrected Warning Output

D:\Desktop\test\src\leptonSDK\FLIR_I2C.cpp: In function 'LEP_RESULT DEV_I2C_MasterWriteData(LEP_UINT16, LEP_UINT8, LEP_UINT16, LEP_UINT16*, LEP_UINT16, LEP_UINT16*, LEP_UINT16*)':
D:\Desktop\test\src\leptonSDK\FLIR_I2C.cpp:254:59: error: call of overloaded 'write(LEP_UINT8*&, LEP_INT32&)' is ambiguous
     bytesActuallyWritten = Wire.write(txdata, bytesToWrite);
                                                           ^

Note that in the corrected file output, the source file properly links to the actual user file that the error occurred in.

Environment

  • CLI version (output of arduino-cli version): 0.14.0
  • OS and platform: Windows 10 x64

Additional context

This is absolutely necessary for properly implementing problem matching to allow for integrating arduino-cli into an IDE. With the outputs working the way that they currently do, clicking on errors will cause the file in the temporary directory to be opened, instead. This will cause the developer to edit a file that will simply be overwritten on the next build.

@per1234
Copy link
Contributor

per1234 commented Jan 2, 2021

Hi @marsfan. Thanks for taking the time to submit an issue. We have a previous report for this: #965 and even a proposed fix: #707

Since it's better to concentrate all the discussion for each distinct topic in a single issue, I'll go ahead and close this as a duplicate.

@per1234 per1234 closed this as completed Jan 2, 2021
@per1234 per1234 added the conclusion: duplicate Has already been submitted label Jan 2, 2021
@marsfan
Copy link
Author

marsfan commented Jan 2, 2021

@per1234 No problem. I guess my searching skills failed me this time around.

@rsora rsora reopened this May 11, 2021
@per1234 per1234 self-assigned this Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted
Projects
None yet
Development

No branches or pull requests

4 participants