Skip to content

Auto-normalize versions in input flags and from parsing of indexes. #2108

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .licenses/go/go.bug.st/relaxed-semver.dep.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: go.bug.st/relaxed-semver
version: v0.9.0
version: v0.9.1-0.20230314155704-b3598a6a660a
type: go
summary:
homepage: https://pkg.go.dev/go.bug.st/relaxed-semver
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ require (
github.com/stretchr/testify v1.8.0
go.bug.st/cleanup v1.0.0
go.bug.st/downloader/v2 v2.1.1
go.bug.st/relaxed-semver v0.9.0
go.bug.st/relaxed-semver v0.9.1-0.20230314155704-b3598a6a660a
go.bug.st/serial v1.3.2
golang.org/x/crypto v0.7.0
golang.org/x/text v0.8.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,8 @@ go.bug.st/cleanup v1.0.0 h1:XVj1HZxkBXeq3gMT7ijWUpHyIC1j8XAoNSyQ06CskgA=
go.bug.st/cleanup v1.0.0/go.mod h1:EqVmTg2IBk4znLbPD28xne3abjsJftMdqqJEjhn70bk=
go.bug.st/downloader/v2 v2.1.1 h1:nyqbUizo3E2IxCCm4YFac4FtSqqFpqWP+Aae5GCMuw4=
go.bug.st/downloader/v2 v2.1.1/go.mod h1:VZW2V1iGKV8rJL2ZEGIDzzBeKowYv34AedJz13RzVII=
go.bug.st/relaxed-semver v0.9.0 h1:qt0T8W70VCurvsbxRK25fQwiTOFjkzwC/fDOpyPnchQ=
go.bug.st/relaxed-semver v0.9.0/go.mod h1:ug0/W/RPYUjliE70Ghxg77RDHmPxqpo7SHV16ijss7Q=
go.bug.st/relaxed-semver v0.9.1-0.20230314155704-b3598a6a660a h1:A/remezl8Ij2BTFsluluSVdozePONy1R1qeduQlghCU=
go.bug.st/relaxed-semver v0.9.1-0.20230314155704-b3598a6a660a/go.mod h1:lPVGdtzbQ9/2fv6iXqIXWHOj6cMTUJ/l/Lu1w+sgdio=
go.bug.st/serial v1.3.2 h1:6BFZZd/wngoL5PPYYTrFUounF54SIkykHpT98eq6zvk=
go.bug.st/serial v1.3.2/go.mod h1:jDkjqASf/qSjmaOxHSHljwUQ6eHo/ZX/bxJLQqSlvZg=
go.bug.st/testifyjson v1.1.1 h1:nHotIMK151LF3vYsU/b2RaoVaWCgrf2kvQeGNoZkGaA=
Expand Down
12 changes: 12 additions & 0 deletions internal/integrationtest/lib/lib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,18 @@ func TestInstall(t *testing.T) {
_, stderr, err := cli.Run("lib", "install", "[email protected]")
require.Error(t, err)
require.Contains(t, string(stderr), "No valid dependencies solution found: dependency 'MD_MAX72xx' is not available")

// Test installing a library with a "relaxed" version
// https://github.com/arduino/arduino-cli/issues/1727
_, _, err = cli.Run("lib", "install", "[email protected]")
require.NoError(t, err)
stdout, _, err := cli.Run("lib", "list", "--format", "json")
require.NoError(t, err)
requirejson.Parse(t, stdout).Query(`.[] | select(.library.name == "ILI9341_t3") | .library.version`).MustEqual(`"1.0.0"`)
_, _, err = cli.Run("lib", "install", "ILI9341_t3@1")
require.NoError(t, err)
_, _, err = cli.Run("lib", "install", "[email protected]")
require.NoError(t, err)
}

func TestInstallLibraryWithDependencies(t *testing.T) {
Expand Down