Skip to content

Conversation

sparkyb
Copy link
Contributor

@sparkyb sparkyb commented Sep 11, 2025

Previously a local library path would be relative to the sketch folder if you passed a folder path to compile, but if you passed a path to a sketch .ino file, it would be considered relative to that. This change makes it so that relative paths will consistently be interpreted relative to the folder whether you specify a .ino file or not.

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull 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?

Bug fix

What is the current behavior?

#3005

@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project topic: package-management Related to the packaging and managing of the platform/libraries labels Sep 11, 2025
@cmaglie cmaglie self-assigned this Oct 20, 2025
Previously a local library path would be relative to the sketch folder if you
passed a folder path to compile, but if you passed a path to a sketch .ino file,
it would be considered relative to that. This change makes it so that relative
paths will consistently be interpreted relative to the folder whether you
specify a .ino file or not.
@cmaglie cmaglie force-pushed the relative-local-libs branch from 62bcf0e to 8a3ce8b Compare October 20, 2025 12:34
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.38%. Comparing base (20e315c) to head (3bdd8b2).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3006      +/-   ##
==========================================
+ Coverage   68.36%   68.38%   +0.01%     
==========================================
  Files         241      241              
  Lines       22731    22734       +3     
==========================================
+ Hits        15541    15547       +6     
+ Misses       5992     5990       -2     
+ Partials     1198     1197       -1     
Flag Coverage Δ
unit 68.38% <100.00%> (+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.

Copy link
Member

@cmaglie cmaglie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let's wait a bit for docker.io to come back online and make the CI green.

I've just pushed a small refactoring in the way the sketch path is obtained.
Thanks also for making the tests 💯

@cmaglie cmaglie merged commit a8423ab into arduino:master Oct 21, 2025
179 of 187 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: code Related to content of the project itself topic: package-management Related to the packaging and managing of the platform/libraries type: imperfection Perceived defect in any part of project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect relative local library dependency path resolution when sketch file path used as argument

3 participants