Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ctags: filterSketchSource: enlarge buffer size to handle long lines#2935

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
cmaglie merged 3 commits intoarduino:masterfromfacchinm:scanner_line_too_long
Jun 26, 2025

Conversation

facchinm
Copy link
Member

@facchinmfacchinm commentedJun 16, 2025
edited by cmaglie
Loading

Fixesarduino/ArduinoCore-zephyr#140

Please check if the PR fulfills these requirements

Seehow to contribute

  • The PR has no duplicates (please search among thePull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

When parsing the preprocessed file, only the lines relevant for the sketch are preserved.
However, golang'sscanner fails if a line is too long for its buffer.
Overcome the issue by adding a 1MB buffer (extremely conservative) and a non-fatal error message in case it's still not enough.

What is the current behavior?

Compiling any sketch fromhttps://github.com/arduino/ArduinoCore-zephyr fails to create prototypes due toanalogPins macro, which expands into a ~90K characters line

What is the new behavior?

The prototypes are created correctly

Does this PR introduce a breaking change, and istitled accordingly?

No breaking change

Other information

pillo79 and AntonioBerna reacted with heart emoji
@facchinmfacchinm requested a review fromcmaglieJune 16, 2025 09:45
@per1234per1234 added topic: codeRelated to content of the project itself type: imperfectionPerceived defect in any part of project topic: build-processRelated to the sketch build process labelsJun 16, 2025
@cmaglie
Copy link
Member

Can you provide an example of a preprocessed source to make a unit test?

@cmaglie
Copy link
Member

I've tested the example inarduino/ArduinoCore-zephyr#140 and the patch doesn't seem to solve the issue 🤔

~/Arduino/Test$ arduino-cli compile -b arduino:zephyr:giga --build-path build /home/cmaglie/Arduino/Test/Test.ino: In function 'void setup()':/home/cmaglie/Arduino/Test/Test.ino:6:3: error: 'wait_for_input' was not declared in this scope    6 |   wait_for_input();      |   ^~~~~~~~~~~~~~Piattaforma utilizzata Versione Percorsoarduino:zephyr         0.3.1    /home/cmaglie/.arduino15/packages/arduino/hardware/zephyr/0.3.1Si è verificato un errore durante la compilazione: exit status 1

@cmaglie
Copy link
Member

cmaglie commentedJun 26, 2025
edited
Loading

Ok, never mind, my mistake. PEBKAC. The patch works.

@cmagliecmaglieforce-pushed thescanner_line_too_long branch from2ba1862 tof6153baCompareJune 26, 2025 15:34
@cmagliecmaglie self-assigned thisJun 26, 2025
@codecovCodecov
Copy link

codecovbot commentedJun 26, 2025
edited
Loading

Codecov Report

Attention: Patch coverage is58.33333% with5 lines in your changes missing coverage. Please review.

Project coverage is 67.81%. Comparing base(241e7d4) to head(f6153ba).
Report is 1 commits behind head on master.

Files with missing linesPatch %Lines
...nal/arduino/builder/internal/preprocessor/ctags.go58.33%4 Missing and 1 partial⚠️
Additional details and impacted files
@@            Coverage Diff             @@##           master    #2935      +/-   ##==========================================- Coverage   67.81%   67.81%   -0.01%==========================================  Files         238      238                Lines       22450    22460      +10     ==========================================+ Hits        15225    15231       +6- Misses       6022     6025       +3- Partials     1203     1204       +1
FlagCoverage Δ
unit67.81% <58.33%> (-0.01%)⬇️

Flags with carried forward coverage won't be shown.Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cmagliecmaglie merged commit4891ded intoarduino:masterJun 26, 2025
101 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@alessio-peruginialessio-peruginialessio-perugini left review comments

@cmagliecmagliecmaglie approved these changes

Assignees

@cmagliecmaglie

Labels
topic: build-processRelated to the sketch build processtopic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Zephyr Arduino Builds are not creating the function prototypes, like other builds...
4 participants
@facchinm@cmaglie@alessio-perugini@per1234

[8]ページ先頭

©2009-2025 Movatter.jp