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] Pass CMAKE_DISABLE_SOURCE_CHANGES to all ports by default #10999

Conversation

ras0219-msft
Copy link
Contributor

This PR passes CMAKE_DISABLE_SOURCE_CHANGES by default to all vcpkg_configure_cmake() calls, which prevents any race conditions around parallel configure steps. It is disabled when passing DISABLE_PARALLEL_CONFIGURE, since this also removes the race condition.

@ras0219-msft ras0219-msft added the info:internal This PR or Issue was filed by the vcpkg team. label Apr 24, 2020
@ras0219-msft ras0219-msft self-assigned this Apr 24, 2020
@Neumann-A
Copy link
Contributor

Just a Note about this: https://gitlab.kitware.com/cmake/cmake/issues/18403

@@ -263,6 +265,7 @@ function(vcpkg_configure_cmake)
-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug)

if(NINJA_HOST AND CMAKE_HOST_WIN32 AND NOT _csc_DISABLE_PARALLEL_CONFIGURE)
list(APPEND _csc_OPTIONS "-DCMAKE_DISABLE_SOURCE_CHANGES=ON")
Copy link
Contributor

Choose a reason for hiding this comment

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

may I ask you why only for windows hosts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now, I'm specifically attaching this to parallel configure (which is where we are getting flakiness in our CI system) to minimize the initial pain. We might roll this out for everyone, always, but my main objective for now is to reduce race conditions.

Copy link
Contributor

Choose a reason for hiding this comment

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

Understood thanks.
I like also the future possibility of “imposing” to not touch the source tree, ever, by the configure/build scripts, independently of parallel configure. But again, I understand your pain with flackiness due to Windows hosts using ninja to parallelize configure step.

@cbezault cbezault 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 Apr 28, 2020
@cbezault
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ras0219-msft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ras0219-msft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BillyONeal
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ras0219
Copy link
Contributor

ras0219 commented Jun 4, 2020

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 10999 in repo microsoft/vcpkg

…disable-source-changes

# Conflicts:
#	toolsrc/src/vcpkg/build.cpp
@strega-nil
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BillyONeal
Copy link
Member

Closed as duplicate.

@BillyONeal BillyONeal closed this Aug 22, 2020
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 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.

7 participants