Skip to content

Commit ab58758

Browse files
cmaglieOliver Schönrock
andauthored
Improved error messages for .cpp/.h file in the sketch (arduino#1224)
Add #line tags to AdditionalFiles when copying to build directory Co-authored-by: Oliver Schönrock <oliver@openbrackets.net>
1 parent df03ad7 commit ab58758

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arduino/builder/sketch.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ func SketchCopyAdditionalFiles(sketch *sketch.Sketch, destPath string, overrides
289289
sourceBytes = s
290290
}
291291

292+
// tag each addtional file with the filename of the source it was copied from
293+
sourceBytes = append([]byte("#line 1 "+QuoteCppString(item.Path)+"\n"), sourceBytes...)
294+
292295
err = writeIfDifferent(sourceBytes, targetPath)
293296
if err != nil {
294297
return errors.Wrap(err, "unable to write to destination file")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy