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

Added provides_includes field in Library gRPC message #934

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

Merged
cmaglie merged 4 commits into arduino:master from cmaglie:populate_provide_includes
Sep 3, 2020

Conversation

Copy link
Member

@cmaglie cmaglie commented Sep 2, 2020

as requested in #928

@kittaakos

kittaakos reacted with heart emoji
@cmaglie cmaglie self-assigned this Sep 2, 2020
@cmaglie cmaglie force-pushed the populate_provide_includes branch from ea3ec75 to 1adce5c Compare September 2, 2020 14:49
Copy link
Contributor

I have verified the changes with a local build:

  • the gRPC API works fine, and
  • I see the desired output from the terminal too. For example: ./arduino-cli lib list --all --fqbn arduino:megaavr:nona4809 --format json provides the expected output with the additional provides_includes info.

Thank you, @cmaglie!

cmaglie reacted with thumbs up emoji

Copy link
Contributor

Please tag the code once this is merged. Thanks!

Copy link

Legion2 commented Sep 27, 2020

I think this was a breaking change, as now headers which are not part of the includes of the library.properties can't be resolved anymore when compiling a sketch that includes them. For example the library "Corsair Lighting Protocol" only declares a single header file which is fine for normal users (https://github.com/Legion2/CorsairLightingProtocol/blob/82c434f6fb2177faccde82b2e41e5210b009382a/library.properties#L10). But for other uses cases other headers must be used, which are not declared by the library because they should not be used when a user adds the library in the Arduino IDE to the sketch. With arduino cli 0.13.0 the sketches which include the headers that are not declared by the library can't be compiled because the includes can't be resolved. I think this is because of the changes in this PR. With arduino cli 0.12.1 the sketches compiled without a problem.

Alternatives for CLPUtils.h: []
ResolveLibrary(CLPUtils.h)
 -> candidates: []
D:\Dokumente\Informatik\Arduino\libraries\CorsairLightingProtocol\examples\DeviceIDTool\DeviceIDTool.ino:19:10: fatal error: CLPUtils.h: No such file or directory
 #include <CLPUtils.h>
 ^~~~~~~~~~~~
compilation terminated.
Error during build: exit status 1

In https://arduino.github.io/arduino-cli/latest/library-specification/ the current behavior is not described, so I think is a bug.

Copy link
Contributor

per1234 commented Sep 27, 2020

Hi @Legion2. I also came to the same conclusion. We are using this bug report: #960 to track the issue.

ubidefeo reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
1 more reviewer

@silvanocerza silvanocerza silvanocerza approved these changes

Reviewers whose approvals may not affect merge requirements
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /