Skip to content

Commit 2639150

Browse files
committed
Initial draft for editable in manifest mode
1 parent 181ca21 commit 2639150

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

include/vcpkg/base/contractual-constants.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ namespace vcpkg
7676
inline constexpr StringLiteral JsonIdOverlayPorts = "overlay-ports";
7777
inline constexpr StringLiteral JsonIdOverlayTriplets = "overlay-triplets";
7878
inline constexpr StringLiteral JsonIdOverrides = "overrides";
79+
inline constexpr StringLiteral JsonIdEditables = "editables";
7980
inline constexpr StringLiteral JsonIdPackages = "packages";
8081
inline constexpr StringLiteral JsonIdPackageUnderscoreName = "package_name";
8182
inline constexpr StringLiteral JsonIdPackageUnderscoreUrl = "package_url";

include/vcpkg/sourceparagraph.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ namespace vcpkg
183183
std::string documentation;
184184
std::vector<Dependency> dependencies;
185185
std::vector<DependencyOverride> overrides;
186+
std::vector<std::string> editables;
186187
std::vector<DependencyRequestedFeature> default_features;
187188

188189
ParsedSpdxLicenseDeclaration license;

src/vcpkg/commands.install.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,6 +1342,17 @@ namespace vcpkg
13421342
.value_or_exit(VCPKG_LINE_INFO);
13431343

13441344
install_plan.print_unsupported_warnings();
1345+
for (InstallPlanAction& action : install_plan.install_actions)
1346+
{
1347+
if(std::find(manifest_core.editables.cbegin(), manifest_core.editables.cend(), action.spec.name()) != manifest_core.editables.cend())
1348+
{
1349+
action.editable = Editable::Yes;
1350+
}
1351+
else
1352+
{
1353+
action.editable = Editable::No;
1354+
}
1355+
}
13451356

13461357
// If the manifest refers to itself, it will be added to the install plan.
13471358
Util::erase_remove_if(install_plan.install_actions,

src/vcpkg/sourceparagraph.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,6 +1367,7 @@ namespace vcpkg
13671367
JsonIdOverrides,
13681368
JsonIdSummary,
13691369
JsonIdSupports,
1370+
JsonIdEditables,
13701371
JsonIdVcpkgConfiguration,
13711372
};
13721373

@@ -1399,6 +1400,8 @@ namespace vcpkg
13991400
r.optional_object_field(obj, JsonIdDependencies, spgh.dependencies, DependencyArrayDeserializer::instance);
14001401
r.optional_object_field(
14011402
obj, JsonIdOverrides, spgh.overrides, DependencyOverrideArrayDeserializer::instance);
1403+
r.optional_object_field(
1404+
obj, JsonIdEditables, spgh.editables, Json::ParagraphDeserializer::instance);
14021405

14031406
r.optional_object_field_emplace(
14041407
obj, JsonIdBuiltinBaseline, spgh.builtin_baseline, BaselineCommitDeserializer::instance);

0 commit comments

Comments
 (0)