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

Make SWIX builds more dependable #25751

Merged
merged 2 commits into from
Mar 28, 2018
Merged

Make SWIX builds more dependable #25751

merged 2 commits into from
Mar 28, 2018

Conversation

jaredpar
Copy link
Member

This should work around the problem with SWIX builds where they fail if
more than one version of the SWIX NuGet package is installed on the
machine.

Ask Mode template not completed

Customer scenario

What does the customer do to get into this situation, and why do we think this
is common enough to address for this release. (Granted, sometimes this will be
obvious "Open project, VS crashes" but in general, I need to understand how
common a scenario is)

Bugs this fixes

(either VSO or GitHub links)

Workarounds, if any

Also, why we think they are insufficient for RC vs. RC2, RC3, or RTW

Risk

This is generally a measure our how central the affected code is to adjacent
scenarios and thus how likely your fix is to destabilize a broader area of code

Performance impact

(with a brief justification for that assessment (e.g. "Low perf impact because no extra allocations/no complexity changes" vs. "Low")

Is this a regression from a previous update?

Root cause analysis

How did we miss it? What tests are we adding to guard against it in the future?

How was the bug found?

(E.g. customer reported it vs. ad hoc testing)

Test documentation updated?

If this is a new non-compiler feature or a significant improvement to an existing feature, update https://github.com/dotnet/roslyn/wiki/Manual-Testing once you know which release it is targeting.

@jaredpar jaredpar requested a review from a team as a code owner March 27, 2018 16:40
@jaredpar
Copy link
Member Author

CC @dotnet/roslyn-infrastructure for review.

@jaredpar
Copy link
Member Author

Note: I deliberately put this into dev15.7.x instead of master. There is a change I have to make for dev15.7 which requires a new version of the SWIX package. Hence trying to stave off the massive set of SWIX warnings that would result from that change.

@jasonmalinowski
Copy link
Member

@jaredpar Seems this breaks the build?

@jaredpar
Copy link
Member Author

Seems this breaks the build?

Worked on my machine ...

@jasonmalinowski
Copy link
Member

@jaredpar Your machine doesn't count. ;-)

This should work around the problem with SWIX builds where they fail if
more than one version of the SWIX NuGet package is installed on the
machine.
The Swix dependency is linked via a "BeforeBuild" target. The targets
file for SWIX unconditionally overrides this target. Hence the
definition must be after.
@jaredpar
Copy link
Member Author

@jasonmalinowski think I fixed it. This time i validated it on my machine.

<Project>
<Import Project="..\..\..\build\Targets\Settings.props" />
<PropertyGroup>
<SwixBuildPath>$(NuGetPackageRoot)\microbuild.plugins.swixbuild\$(MicroBuildPluginsSwixBuildVersion)\</SwixBuildPath>
Copy link
Member

Choose a reason for hiding this comment

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

This version is (at least by name) a different version than what it was previously. Expected?

Copy link
Member Author

Choose a reason for hiding this comment

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

Which name here? Everything should be the same as before.

Copy link
Member

Choose a reason for hiding this comment

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

I get it now. Your explanation cleared things up.

@jasonmalinowski
Copy link
Member

@jaredpar Care to update the pull request with a few sentence summary of the state of the world today? I can see things changing, but I am at a loss to understand how this helps anything.

@jaredpar
Copy link
Member Author

@jasonmalinowski sure

The state of the world before this change is that we indirectly imported the SWIX props and targets files. The direct import was for MicroBuild.Core which then imported SWIX through it's plugin model. The problem with the MicroBuild.Core plugin model is:

  1. The plugin model fails when more than one version of the same NuGet package is installed. Hence when switching between branches or repositories that used different SWIX versions builds would fail with unhelpful error messages.
  2. There are plugins used between the repositories that conflict with each other. For instance the localization plugin conflicts with swix. If both are installed they have conflicting targets.

This makes our build unnecessarily fragile.

Our code only needs the SWIX plugin in order to build today. Hence this changes our build to skip the fragile plugin step and just import the SWIX props / targets.

Copy link
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

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

I hear @jinujoseph was looking to get rid of the squirrel...

@jaredpar jaredpar merged commit 5a7dcd1 into dotnet:dev15.7.x Mar 28, 2018
@jaredpar jaredpar deleted the fix-swix branch March 28, 2018 22:49
@jaredpar
Copy link
Member Author

I hear @jinujoseph was looking to get rid of the squirrel...

You're the second person who said that in response to this PR. That may be bad for me. :)

jaredpar added a commit to jaredpar/roslyn that referenced this pull request Mar 30, 2018
This fixes a signing regression caused be dotnet#25751. That changed us to
directly call the SWIX build props / targets vs. getting them implicitly
from the microbuild props / targets. One of the behaviors that the
microbuild props / targets had that wasn't accounted for was the signing
of the VSIX after they are constructed. Hence this lead to signing
errors on insertion.

This PR fixes that by making the following changes:

1. Adds SWIX VSIX to SignToolData.json so they are accounted for during
normal batch signing.
1. Moves the SWIX build to the pre-sign portion of our build.
1. Removes the references from VSMAN -> SWIX. These references are there
only to enforce ordering which is unnecessary. Having them remain risks
that building the VSMAN will cause the SWIX to be re-built which could
possibly invalidate signing.
dpoeschl pushed a commit that referenced this pull request Apr 23, 2018
This fixes a signing regression caused be #25751. That changed us to
directly call the SWIX build props / targets vs. getting them implicitly
from the microbuild props / targets. One of the behaviors that the
microbuild props / targets had that wasn't accounted for was the signing
of the VSIX after they are constructed. Hence this lead to signing
errors on insertion.

This PR fixes that by making the following changes:

1. Adds SWIX VSIX to SignToolData.json so they are accounted for during
normal batch signing.
1. Moves the SWIX build to the pre-sign portion of our build.
1. Removes the references from VSMAN -> SWIX. These references are there
only to enforce ordering which is unnecessary. Having them remain risks
that building the VSMAN will cause the SWIX to be re-built which could
possibly invalidate signing.
dpoeschl pushed a commit that referenced this pull request May 14, 2018
This fixes a signing regression caused be #25751. That changed us to
directly call the SWIX build props / targets vs. getting them implicitly
from the microbuild props / targets. One of the behaviors that the
microbuild props / targets had that wasn't accounted for was the signing
of the VSIX after they are constructed. Hence this lead to signing
errors on insertion.

This PR fixes that by making the following changes:

1. Adds SWIX VSIX to SignToolData.json so they are accounted for during
normal batch signing.
1. Moves the SWIX build to the pre-sign portion of our build.
1. Removes the references from VSMAN -> SWIX. These references are there
only to enforce ordering which is unnecessary. Having them remain risks
that building the VSMAN will cause the SWIX to be re-built which could
possibly invalidate signing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants