Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg] Allow CI to pass in all relevant directories and remove use of symbolic links #11483

Merged
merged 30 commits into from
Jun 4, 2020

Conversation

BillyONeal
Copy link
Member

Adds --x-foo-root= parameters for the directories to which we have applied symlinks in the past, such as installed, buildtrees, packages, etc.

This is intended to unblock #11365 which broke due the symlink workaround we previously used to get the work tree onto the VM temp disk not working with the current Scale Set Agents installation script.

Drive-by fixes:

  • Fixed help text having differing output and alignment caused by duplicating these declarations in the tool
    image
  • Always use HelpTableFormatter to emit help tables.
  • Fixed parameter validation, filesystem validation, and path conversion being spewed out in between VcpkgCmdArguments, VcpkgPaths, and main(). Now VcpkgCmdArguments owns command line argument parsing and reading defaults from the environment, VcpkgPaths owns only path resolution bits. Theoretically this reduces the fidelity of the error messages we emit here, but I don't think in practice customized error messages for each type of missing input or output directory add much user value. We emit messages containing the bad path whenever something explodes anyway.

@BillyONeal BillyONeal marked this pull request as draft May 21, 2020 02:53
@BillyONeal BillyONeal force-pushed the directories branch 2 times, most recently from 687bcd4 to 206c8cf Compare May 21, 2020 03:12
@BillyONeal BillyONeal force-pushed the directories branch 6 times, most recently from b996a00 to 544a0e5 Compare May 22, 2020 08:13
@BillyONeal BillyONeal marked this pull request as ready for review May 22, 2020 08:13
@MVoz
Copy link
Contributor

MVoz commented May 22, 2020

merge?

@BillyONeal BillyONeal added depends:different-pr This PR or Issue depends on a PR which has been filed info:internal This PR or Issue was filed by the vcpkg team. labels May 25, 2020
@BillyONeal
Copy link
Member Author

BillyONeal commented May 25, 2020

Depends on #11542 and #11545

@@ -109,7 +109,7 @@ function(vcpkg_build_msbuild)
list(
APPEND _csc_OPTIONS
/p:ForceImportBeforeCppTargets=${SCRIPTS}/buildsystems/msbuild/vcpkg.targets
"/p:VcpkgTriplet=${TARGET_TRIPLET}"
"/p:VcpkgRoot=${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}"
Copy link
Contributor

@Neumann-A Neumann-A May 25, 2020

Choose a reason for hiding this comment

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

That is wrong.
You probably want

"/p:VcpkgTriplet=${TARGET_TRIPLET}"
"/p:VcpkgRoot=${CURRENT_INSTALLED_DIR}"

nevermind just checked the targets VcpkgRoot is named wrongly
still wrong

Copy link
Contributor

@Neumann-A Neumann-A May 25, 2020

Choose a reason for hiding this comment

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

VcpkgRoot should be renamed to VcpkgInstalledTripletRoot instead.... (naming is hard) (or VcpkgTripletInstalledDir)

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Is ${CURRENT_INSTALLED_DIR} installed/triplet or just installed?

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -110,6 +110,7 @@ function(vcpkg_build_msbuild)
APPEND _csc_OPTIONS
/p:ForceImportBeforeCppTargets=${SCRIPTS}/buildsystems/msbuild/vcpkg.targets
"/p:VcpkgTriplet=${TARGET_TRIPLET}"
"/p:VcpkgRoot=${CURRENT_INSTALLED_DIR}"
Copy link
Contributor

Choose a reason for hiding this comment

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

is VcpkgRoot the equivalent of CURRENT_INSTALLED_DIR? I would expect this variable to be something like where the vcpkg executable lives.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it is like CURRENT_INSTALLED_DIR -- the name is bad because I didn't write the script consuming the variable (it's $/scripts/buildsystems/msbuild/vcpkg.targets). I don't want to edit that here because I don't know exactly how it interacts with vcpkg integrate install. Would filing an issue about it and addressing in a subsequent PR be OK? (I don't want to grow this PR even bigger :) )

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmm I guess I could make a dependent change which changes that name, stand by...

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

so should we merge 11653 first?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, done.

@BillyONeal BillyONeal added depends:different-pr This PR or Issue depends on a PR which has been filed and removed depends:different-pr This PR or Issue depends on a PR which has been filed labels May 29, 2020
# Conflicts:
#	toolsrc/include/vcpkg/vcpkgcmdarguments.h
#	toolsrc/src/vcpkg.cpp
#	toolsrc/src/vcpkgcmdarguments.cpp
Copy link
Contributor

@JackBoosY JackBoosY left a comment

Choose a reason for hiding this comment

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

Please update qt5-base, shiva-sfml, spirv-tools version info. See documentation.

@BillyONeal BillyONeal requested a review from JackBoosY June 3, 2020 00:33
@BillyONeal
Copy link
Member Author

Please update qt5-base, shiva-sfml, spirv-tools version info. See documentation.

Done, thanks!

…edDir.

I could have ensured we always passed the trailing slash, but defending against it here makes it easier for users if they want to use /p themselves.
@BillyONeal BillyONeal merged commit 4fb2256 into microsoft:master Jun 4, 2020
@BillyONeal BillyONeal deleted the directories branch June 4, 2020 02:31
allow us to override a console provided property here. -->
<VcpkgRootSanitized>$(VcpkgRoot)</VcpkgRootSanitized>
<VcpkgRootSanitized Condition="!$(VcpkgRootSanitized.EndsWith('\'))">$(VcpkgRootSanitized)\</VcpkgRootSanitized>
<VcpkgCurrentInstalledDirSanitized>$(VcpkgCurrentInstalledDir)</VcpkgCurrentInstalledDirSanitized>
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like there is a problem here.
The VcpkgCurrentInstalledDir initialization was removed few lines above and it's empty now.

strega-nil pushed a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants