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

Added gRPC functions to manage libraries in profiles#3019

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

Draft
cmaglie wants to merge17 commits intoarduino:master
base:master
Choose a base branch
Loading
fromcmaglie:grpc-profiles-functions

Conversation

@cmaglie
Copy link
Member

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?

This is an extract of#2917 containing only the gRPC part of the PR.

What is the current behavior?

Adds only the gRPC functions for managing libraries in profiles, no user-facing changes.

What is the new behavior?

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

No

Other information

@cmagliecmaglie self-assigned thisOct 3, 2025
@cmagliecmaglie added type: enhancementProposed improvement topic: gRPCRelated to the gRPC interface labelsOct 3, 2025
@per1234per1234 added the topic: codeRelated to content of the project itself labelOct 4, 2025
per1234
per1234 previously requested changesOct 5, 2025
@codecov
Copy link

codecovbot commentedOct 6, 2025
edited
Loading

Codecov Report

❌ Patch coverage is18.41004% with390 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.34%. Comparing base (a8423ab) to head (0c28634).
⚠️ Report is 1 commits behind head on master.

Files with missing linesPatch %Lines
commands/service_profile_lib_add.go0.00%104 Missing⚠️
internal/arduino/sketch/profiles.go18.03%91 Missing and 9 partials⚠️
commands/service_profile_init.go0.00%59 Missing⚠️
commands/service_profile_lib_remove.go0.00%33 Missing⚠️
commands/instances.go0.00%25 Missing and 1 partial⚠️
commands/service_profile_lib_list.go0.00%20 Missing⚠️
commands/service_profile_set_default.go0.00%19 Missing⚠️
commands/cmderrors/cmderrors.go0.00%10 Missing and 1 partial⚠️
...rnal/arduino/libraries/librariesmanager/install.go65.21%7 Missing and 1 partial⚠️
commands/service_library_install.go56.25%5 Missing and 2 partials⚠️
... and1 more
Additional details and impacted files
@@            Coverage Diff             @@##           master    #3019      +/-   ##==========================================- Coverage   68.39%   67.34%   -1.06%==========================================  Files         241      246       +5       Lines       22734    23137     +403     ==========================================+ Hits        15550    15582      +32- Misses       5988     6350     +362- Partials     1196     1205       +9
FlagCoverage Δ
unit67.34% <18.41%> (-1.06%)⬇️

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.

As stated by@per1234:> Build profile data is already provided via the LoadSketch method, so it> seems that even a mechanism that is truly for getting profile data should> be implemented by simply expanding the SketchProfile message to contain> all the data of the build profile (actually kind of silly that it> currently only provides a subset of the profile data).arduino#3019 (comment)
@per1234per1234 dismissed theirstale reviewOctober 6, 2025 13:17

Requested change has been made. Thanks!

// Name of the library.
stringname=1;
// Version of the library if taken from the Library Index.
stringversion=2;
Copy link
Contributor

Choose a reason for hiding this comment

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

Clients would love to use a dedicated message to add the latest version of the library (without listing the available versions), and maybe add the currently installed version that errors if the library is not installed.

And also corresponding messages:  InitProfileRequest -> ProfileCreateRequest  InitProfileResponse -> ProfileCreateResponse
The function is now split into two functions:- librariesGetAllInstalled that requires a librariesmanager.Explorer.- libraryResolveDependencies that requires only a librariesindex.Index  and do not require anymore a librariesmanager.Explorer.
@cmagliecmaglieforce-pushed thegrpc-profiles-functions branch fromdbac430 to2327b35CompareOctober 29, 2025 10:00
@dankeboy36
Copy link
Contributor

Hello Cristian,

Thanks for your great work 💪 I’ve been testing this area from the IDE side and was wondering how this feature is expected to work with an IDE or editor. Maybe this isn’t the most appropriate channel, but I guess you’re the best person to ask.

It’s clear there’s a real need for this feature:

While reading the PR and the related IDE issuearduino/arduino-ide#2573, I was trying to understand how profiles are meant to behave over gRPC, maybe later in Arduino IDE 2.x:

  • If an IDE opens two sketches with different profiles (e.g.arduino:avr:uno andesp32:esp32:esp32da), should each sketch have its own gRPC client or session?
  • When switching or activating a profile, does the CLI reinitialize the build environment (toolchains, platforms, libraries), or are these shared and cached? For example, iflibA is installed in profileA but not in profileB, will a library search over gRPC return different results for each profile?
  • If multiple profiles use the same library, will it be installed multiple times, or can they share a global copy? Since each sketch can have its ownsketch.yaml, does that mean the same dependency could be downloaded many times?
  • When using gRPC, shouldcompile,upload, etc. always loadfqbn,port, and other settings from the active profile, or should clients omit them?

I really like how profiles make builds reproducible and easy to share — that’s perfect for CI or collaborative work. But in an IDE that uses gRPC interactively, managing multiple isolated clients could get heavy, especially if it means repeated downloads.

In my current setup I treatsketch.yaml mostly as a lightweight config file. Libraries and platforms are managed globally, and if something is missing, the user only gets a warning instead of full profile enforcement.

I’d be curious to hear how Arduino sees this working long-term on the gRPC side — especially for IDE integration. Will profiles act more like isolated environments or just as stored build settings that can be written and updated through gRPC?

No hurry with this. Thanks a lot for your time

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@per1234per1234per1234 left review comments

+1 more reviewer

@dankeboy36dankeboy36dankeboy36 left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

@cmagliecmaglie

Labels

topic: codeRelated to content of the project itselftopic: gRPCRelated to the gRPC interfacetype: enhancementProposed improvement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@cmaglie@dankeboy36@per1234

[8]ページ先頭

©2009-2025 Movatter.jp