forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[vcpkg] Implement VersionedPortfileProvider and BaselineProvider (mic…
…rosoft#14123) * WIP: Get versions from database files * Fix formatting * Provider inherits ResourceBase * Correct versions JSON file location * Fix formatting * Fix formatting * Fix include in versions.h * Fetch port versions using git tree object * Undo changes to x-history * Remove unnecesary moves Co-authored-by: nicole mazzuca <[email protected]> * Extract Git manipulation code * [WIP] Review comments * [WIP] Review comments pt. 2 * [WIP] Review comments / fix formatting * Generate baseline.json * Extract deserializers from registries source file * BaselineProvider initial implementation * Modify gitignore * Update .gitignore again * Use JSON deserializer for versions db * Lazy load baseline file * Fetch baseline.json from baseline commit * More git abstractions * Clean up code * Path helpers * Formatting * Move data into impl object * Use implementation object for VersionedPortfileProvider * Reuse cloned instance for checkouts * Code cleanup and formatting * Fix returning dangling reference * Prepare to remove files in port_versions/ * Remove files in port_versions/ * Update .gitignore * Some PR review comments * Use StringView * More StringView conversions * More refactoring * Make some implementation members private * Functions for parsing baseline and version files * Hide deserializers implementation * Check for `versions` feature flag in registries. Co-authored-by: Robert Schumacher <[email protected]> Co-authored-by: nicole mazzuca <[email protected]>
- Loading branch information
1 parent
62fe6ff
commit 6c9cda1
Showing
13 changed files
with
832 additions
and
87 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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#pragma once | ||
|
||
#include <vcpkg/base/fwd/stringview.h> | ||
|
||
#include <vcpkg/base/jsonreader.h> | ||
#include <vcpkg/base/stringliteral.h> | ||
|
||
#include <vcpkg/versions.h> | ||
#include <vcpkg/versiont.h> | ||
|
||
namespace vcpkg | ||
{ | ||
struct VersionDbEntry | ||
{ | ||
VersionT version; | ||
Versions::Scheme scheme; | ||
std::string git_tree; | ||
|
||
VersionDbEntry(const std::string& version_string, | ||
int port_version, | ||
Versions::Scheme scheme, | ||
const std::string& git_tree) | ||
: version(VersionT(version_string, port_version)), scheme(scheme), git_tree(git_tree) | ||
{ | ||
} | ||
}; | ||
|
||
Json::IDeserializer<VersionT>& get_versiont_deserializer_instance(); | ||
|
||
ExpectedS<std::map<std::string, VersionT, std::less<>>> parse_baseline_file(Files::Filesystem& fs, | ||
StringView baseline_name, | ||
const fs::path& baseline_file_path); | ||
|
||
ExpectedS<std::vector<VersionDbEntry>> parse_versions_file(Files::Filesystem& fs, | ||
StringView port_name, | ||
const fs::path& versions_file_path); | ||
} |
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
Oops, something went wrong.