Skip to content
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

[breaking] Fixed regression in library discovery #1741

Merged
merged 4 commits into from
May 31, 2022

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented May 30, 2022

Please check if the PR fulfills these requirements

  • 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)

What kind of change does this PR introduce?
Should fix #1740

What is the current behavior?
Bundled libraries from unused platforms are considered for inclusion

What is the new behavior?
Bundled libraries from unused platforms are ignored

Does this PR introduce a breaking change, and is titled accordingly?
No Yes, see comments below

Other information:
The integration test does not check for the compilation error in #1740, but more simply if the message More than one library found for Wire.h appears in a failed build.

@cmaglie cmaglie self-assigned this May 30, 2022
@cmaglie cmaglie requested a review from a team May 30, 2022 15:44
@cmaglie cmaglie changed the title Fixed regression in library dscovery Fixed regression in library discovery May 30, 2022
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels May 31, 2022
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

I notice #1565 no longer occurs when using the build from this PR.

I don't know whether there was ever a ruling on whether the behavior described in #1565 was considered desirable.

I'm fine with its discontinuation because the one potential value it had in easing migration to an IDE 2.x which did not provide the traditional bundled libraries is lessened now that the IDE does automatically install the libraries on first run (arduino/arduino-ide#663).

I do recommend documenting this change though because it might cause some user's sketches that have dependencies on libraries from the IDE 1.x installation to no longer compile. It will be easy enough for them to fix it by installing the lost libraries via Library Manager though.

arduino/libraries/librariesresolver/cpp.go Show resolved Hide resolved
arduino/libraries/librariesresolver/cpp.go Show resolved Hide resolved
@cmaglie
Copy link
Member Author

cmaglie commented May 31, 2022

I do recommend documenting this change though because it might cause some user's sketches that have dependencies on libraries from the IDE 1.x installation to no longer compile. It will be easy enough for them to fix it by installing the lost libraries via Library Manager though.

as breaking change?

@per1234
Copy link
Contributor

per1234 commented May 31, 2022

as breaking change?

I think it would be safest to do so.

Even though it was undocumented, perhaps even unintended behavior, it has been the behavior for years now (I just verified that #1565 affects the oldest Arduino CLI version I happen to have on my computer, 0.4.0 from 2019-08-05).

@cmaglie cmaglie changed the title Fixed regression in library discovery [breaking] Fixed regression in library discovery May 31, 2022
@cmaglie
Copy link
Member Author

cmaglie commented May 31, 2022

Done

@cmaglie cmaglie merged commit 4ec6b97 into arduino:master May 31, 2022
@cmaglie cmaglie deleted the fix_lib_resolver branch May 31, 2022 10:19
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 type: imperfection Perceived defect in any part of project
Projects
None yet
3 participants