-
Notifications
You must be signed in to change notification settings - Fork 571
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: properly parse conan ref and include user and channel (#2034)
* fix: properly parse conan ref and include user and channel Signed-off-by: Stefan Profanter <[email protected]> * unexport the conanRef type Signed-off-by: Alex Goodman <[email protected]> --------- Signed-off-by: Stefan Profanter <[email protected]> Signed-off-by: Alex Goodman <[email protected]> Co-authored-by: Alex Goodman <[email protected]>
- Loading branch information
Showing
6 changed files
with
131 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,13 +52,13 @@ func TestParseConanfile(t *testing.T) { | |
{ | ||
Name: "spdlog", | ||
Version: "1.9.2", | ||
PURL: "pkg:conan/[email protected]", | ||
PURL: "pkg:conan/my_user/[email protected]?channel=my_channel", | ||
Locations: fixtureLocationSet, | ||
Language: pkg.CPP, | ||
Type: pkg.ConanPkg, | ||
MetadataType: pkg.ConanMetadataType, | ||
Metadata: pkg.ConanMetadata{ | ||
Ref: "spdlog/1.9.2", | ||
Ref: "spdlog/1.9.2@my_user/my_channel#1234567%%987654", | ||
}, | ||
}, | ||
{ | ||
|
@@ -70,19 +70,19 @@ func TestParseConanfile(t *testing.T) { | |
Type: pkg.ConanPkg, | ||
MetadataType: pkg.ConanMetadataType, | ||
Metadata: pkg.ConanMetadata{ | ||
Ref: "sdl/2.0.20", | ||
Ref: "sdl/2.0.20#1234567%%987654", | ||
}, | ||
}, | ||
{ | ||
Name: "fltk", | ||
Version: "1.3.8", | ||
PURL: "pkg:conan/[email protected]", | ||
PURL: "pkg:conan/my_user/[email protected]?channel=my_channel", | ||
Locations: fixtureLocationSet, | ||
Language: pkg.CPP, | ||
Type: pkg.ConanPkg, | ||
MetadataType: pkg.ConanMetadataType, | ||
Metadata: pkg.ConanMetadata{ | ||
Ref: "fltk/1.3.8", | ||
Ref: "fltk/1.3.8@my_user/my_channel", | ||
}, | ||
}, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,20 +13,49 @@ func TestParseConanlock(t *testing.T) { | |
fixture := "test-fixtures/conan.lock" | ||
expected := []pkg.Package{ | ||
{ | ||
Name: "zlib", | ||
Version: "1.2.12", | ||
PURL: "pkg:conan/zlib@1.2.12", | ||
Name: "spdlog", | ||
Version: "1.11.0", | ||
PURL: "pkg:conan/spdlog@1.11.0", | ||
Locations: file.NewLocationSet(file.NewLocation(fixture)), | ||
Language: pkg.CPP, | ||
Type: pkg.ConanPkg, | ||
MetadataType: pkg.ConanLockMetadataType, | ||
Metadata: pkg.ConanLockMetadata{ | ||
Ref: "zlib/1.2.12", | ||
Ref: "spdlog/1.11.0", | ||
Options: map[string]string{ | ||
"fPIC": "True", | ||
"shared": "False", | ||
"fPIC": "True", | ||
"header_only": "False", | ||
"no_exceptions": "False", | ||
"shared": "False", | ||
"wchar_filenames": "False", | ||
"wchar_support": "False", | ||
"fmt:fPIC": "True", | ||
"fmt:header_only": "False", | ||
"fmt:shared": "False", | ||
"fmt:with_fmt_alias": "False", | ||
"fmt:with_os_api": "True", | ||
}, | ||
Path: "conanfile.py", | ||
Context: "host", | ||
}, | ||
}, | ||
{ | ||
Name: "fmt", | ||
Version: "9.1.0", | ||
PURL: "pkg:conan/my_user/[email protected]?channel=my_channel", | ||
Locations: file.NewLocationSet(file.NewLocation(fixture)), | ||
Language: pkg.CPP, | ||
Type: pkg.ConanPkg, | ||
MetadataType: pkg.ConanLockMetadataType, | ||
Metadata: pkg.ConanLockMetadata{ | ||
Ref: "fmt/9.1.0@my_user/my_channel#6708c9d84f98d56a6d9f2e6c2d5639ba", | ||
Options: map[string]string{ | ||
"fPIC": "True", | ||
"header_only": "False", | ||
"shared": "False", | ||
"with_fmt_alias": "False", | ||
"with_os_api": "True", | ||
}, | ||
Path: "all/conanfile.py", | ||
Context: "host", | ||
}, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters