-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Remove BuildPackageOptions from the ActionPlan #1339
Remove BuildPackageOptions from the ActionPlan #1339
Conversation
PurgeDecompressFailure causes the files backend for binary caching to delete the zip file if it fails to decompress. The install command set this to false due to a race consideration: it's possible that a partially uploaded zip is observed when the files backend is pointed to a network share, and deleting the file because we failed to decompress it just stomps on another builder sharing that same binary cache. It seems incorrect that this reasoning would not apply to any other commands, but most of the other commands said PurgeDecompressFailure::Yes. This change removes the option entirely in favor of the 'No' behavior.
These are already implied by the blockers on line 1075 and 1080.
… the consumption side of install plan action. This means that all BuildOptions for all actions will be the same in preparation for removing this member entirely.
…they are the same for all actions.
… command_set_installed_and_exit_ex
src/vcpkg/commands.build.cpp
Outdated
action.request_type == RequestType::USER_REQUESTED && Util::Enum::to_bool(build_options.use_head_version) | ||
? "1" | ||
: "0"}, | ||
{"_VCPKG_DOWNLOAD_TOOL", to_string_view(build_options.download_tool)}, | ||
{"_VCPKG_EDITABLE", | ||
action.request_type == RequestType::USER_REQUESTED && Util::Enum::to_bool(build_options.editable) ? "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see an argument to put UseHeadVersion and/or Editable back into the ActionPlan since this can vary by according to user requested but this seemed simpler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They do seem more tied to the install action itself rather than an overarching "plan" property. By my reading, these are the only "ABI affecting" options, so putting them into the plan would simplify several function interfaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good reason to go that way instead.
…values # Conflicts: # src/vcpkg/commands.build-external.cpp # src/vcpkg/commands.build.cpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved assuming editable
and use_head_version
are renamed to indicate that they only take effect if the action was a direct dependency (user requested)
@@ -253,7 +253,6 @@ namespace | |||
{ | |||
nothing, | |||
always, | |||
on_fail, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this removed due to no mechanism to access it via UX?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct. There was one path where it got set but that path seemed like a bug. See rationale in 8b30b0c
…values # Conflicts: # src/vcpkg/commands.build.cpp # src/vcpkg/commands.install.cpp # src/vcpkg/commands.set-installed.cpp # src/vcpkg/commands.upgrade.cpp
…into the ActionPlan.
…range that the abi hash depends on whether download_only is selected. After discussion with @ras0219-msft , he agreed that the ABI hash shouldn't be affected by this setting. However, given that in download mode, we intentionally build things which do not have all their dependencies present, it would not be safe to attempt to cache or otherwise install anything in that condition. This change removes download_only from the ABI calculation, and changes installation to only attempt to install built bits whose dependencies are all satisfied.
# Conflicts: # src/vcpkg/commands.build.cpp # src/vcpkg/commands.install.cpp
… for already installed ports.
While reviewing changes to #1339 , I observed that it was strange that the abi hash depends on whether download_only is selected. After discussion with @ras0219-msft , he agreed that the ABI hash shouldn't be affected by this setting. However, given that in download mode, we intentionally build things which do not have all their dependencies present, it would not be safe to attempt to cache or otherwise install anything in that condition. This change removes download_only from the ABI calculation, and changes installation to only attempt to install built bits whose dependencies are all satisfied.
…values # Conflicts: # src/vcpkg/commands.build.cpp # src/vcpkg/commands.install.cpp
src/vcpkg/commands.install.cpp
Outdated
if (plan_type == InstallPlanType::ALREADY_INSTALLED) | ||
{ | ||
if (use_head_version && is_user_requested) | ||
// FIXME check that this can still get printed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIXME?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- --head and user requested
- --head and not user requested
…values # Conflicts: # src/vcpkg/dependencies.cpp
The
BuildPackageOptions
contains values that do not change per installation, such as PrintUsage. A likely bug was getting the package plan, and forgetting to fill in theBuildPackageOptions
inside. Instead, this removes theBuildPackageOptions
and passes it around to the places where it is actually needed.The individual commits may help in understanding specific changes.