-
-
Notifications
You must be signed in to change notification settings - Fork 398
Mismatching results when executing platform search in daemon mode #277
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
Comments
I think it is broken for Commit: 1628b39 diff --git a/commands/core/core.go b/commands/core/core.go
index 86845ce..24e1580 100644
--- a/commands/core/core.go
+++ b/commands/core/core.go
@@ -18,6 +18,8 @@
package core
import (
+ "fmt"
+
"github.com/arduino/arduino-cli/arduino/cores"
rpc "github.com/arduino/arduino-cli/rpc/commands"
)
@@ -27,6 +29,8 @@ import (
// platformRelease we're currently converting is actually installed.
func platformReleaseToRPC(platformRelease *cores.PlatformRelease) *rpc.Platform {
boards := make([]*rpc.Board, len(platformRelease.Boards))
+ fmt.Printf("@@@ platformRelease.Boards: %v\n\n", platformRelease.Boards)
+ fmt.Printf("### platformRelease.BoardsManifest: %v\n\n", platformRelease.BoardsManifest)
i := 0
for _, b := range platformRelease.Boards {
boards[i] = &rpc.Board{ Executed command:
I would have expected, when the |
I am still trying to catch up with the codebase but isn't it a problem that we set the
when we load the package index from https:/downloads.arduino.cc/packages/package_index.json ?
|
Fixed by #294 |
Bug Report
Current behavior
I am experiencing some oddities when executing a platform search via the CLI.
When I call the CLI directly, it works. So for instance, when I run
./arduino-cli core list
, everything is fine. Here in the code, both theBoards
andBoardsManifest
are populated on thePlatformRelease
instance as expected; hence mapping to the RPC format is correct.However, when I start the CLI in daemon mode and connect from my client, the
Boards
is empty when I perform the same platform search.Most likely, either my configuration is incomplete, or my
InitRequest
is bogus.I have noticed, the CLI always adds the default package index URL to the board manager additional URLs. I have corrected it; still, the
Bords
array is empty.My client code looks like this:
Expected behavior
The
Boards
are populated just likeBoardsManifest
on thecores.PlatformRelease
instances when calling:arduino-cli/commands/core/core.go
Line 28 in 1628b39
Environment
arduino-cli version
):arduino-cli Version: nightly-21 Commit: 1628b39 BuildDate: 2019-07-15 09:31:26.332485 +0000 UTC
macOS 10.14.4 (18E226)
Additional context
The text was updated successfully, but these errors were encountered: