Skip to content

Conversation

ras0219
Copy link
Contributor

@ras0219 ras0219 commented Sep 10, 2020

This PR delays computation of abi_info.triplet_abi until after we perform a check for conditions that would disable computation of a package abi. This can save several seconds in the port inner-dev loop.

The specific examples of this case are --editable and --head, which will both disable our ability to compute ABIs. Furthermore, if a package without an ABI is installed, all transitive consumers also cannot have their ABIs computed.

Before:

PS C:\src\vcpkg> vcpkg install zlib:x64-windows --editable
Computing installation plan...
The following packages will be built and installed:
    zlib[core]:x64-windows
Detecting compiler hash for triplet x64-windows...
Starting package 1/1: zlib:x64-windows
Building package zlib[core]:x64-windows...
-- Using cached C:/src/vcpkg/downloads/zlib1211.tar.gz
-- Using source at C:/src/vcpkg/buildtrees/zlib/src/1.2.11-63309e48e5
-- Configuring x64-windows
...

After:

PS C:\src\vcpkg> vcpkg install zlib:x64-windows --editable
Computing installation plan...
The following packages will be built and installed:
    zlib[core]:x64-windows
Starting package 1/1: zlib:x64-windows
Building package zlib[core]:x64-windows...
-- Using cached C:/src/vcpkg/downloads/zlib1211.tar.gz
-- Using source at C:/src/vcpkg/buildtrees/zlib/src/1.2.11-63309e48e5
-- Configuring x64-windows
...

+@qis who may be particularly happy about this change :)

@NancyLi1013 NancyLi1013 added the category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed label Sep 11, 2020
Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have a test?

@ras0219
Copy link
Contributor Author

ras0219 commented Sep 16, 2020

Adding a test would require mocking System::cmd_execute() and friends; I think that would be too large of an infrastructure change for now given the size of this PR.

@BillyONeal
Copy link
Member

Adding a test would require mocking System::cmd_execute() and friends;

I don't mean a unit test, I mean in the e2e tests.

@qis
Copy link
Contributor

qis commented Sep 21, 2020

@ras0219 Works as advertised. Thank you!

@ras0219-msft
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@ras0219-msft ras0219-msft merged commit d8a4e63 into microsoft:master Oct 6, 2020
strega-nil pushed a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
…#13446)

* [vcpkg] Avoid computing triplet ABIs for editable packages

* [vcpkg] Address PR comments

* [vcpkg-end-to-end-tests] Add tests for --no-binarycaching, binarycaching by default, and --editable

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants