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

Fix build #1967

Merged
merged 1 commit into from
Dec 8, 2016
Merged

Fix build #1967

merged 1 commit into from
Dec 8, 2016

Conversation

dsyme
Copy link
Contributor

@dsyme dsyme commented Dec 8, 2016

Build was failing, I think this is the right fix @brettfo

Build was failing, I think this is the right fix
@brettfo
Copy link
Member

brettfo commented Dec 8, 2016

Good catch, I missed this one in #1903.

@rojepp
Copy link
Contributor

rojepp commented Dec 8, 2016

With this fix applied manually I'm getting this after @brettfo's recent pr:

"C:\dev\fsharp\build-everything.proj" (default target) (1) ->
"C:\dev\fsharp\vsintegration\fsharp-vsintegration-vsix-build.proj" (Build target) (34) ->
"C:\dev\fsharp\vsintegration\Vsix\VisualFSharpOpenSource\VisualFSharpOpenSource.csproj" (Build target) (38) ->
(DeployVsixExtensionFiles target) ->
C:\dev\fsharp\packages\Microsoft.VSSDK.BuildTools.15.0.25929-RC2\tools\vssdk\Microsoft.VsSDK.targets(696,5): error MSB4018: The "EnableExtension" task failed unexpectedly.\r [C:\dev\fsharp\vsintegration\Vsix\VisualFSharpOpenSource\VisualFSharpOpenSource.csproj]
C:\dev\fsharp\packages\Microsoft.VSSDK.BuildTools.15.0.25929-RC2\tools\vssdk\Microsoft.VsSDK.targets(696,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.\r [C:\dev\fsharp\vsintegration\Vsix\VisualFSharpOpenSource\VisualFSharpOpenSource.csproj]
C:\dev\fsharp\packages\Microsoft.VSSDK.BuildTools.15.0.25929-RC2\tools\vssdk\Microsoft.VsSDK.targets(696,5): error MSB4018: at Microsoft.VsSDK.Build.Tasks.ExtensionManagerUtilities.get_ConfigurationChangedReasonKey()\r [C:\dev\fsharp\vsintegration\Vsix\VisualFSharpOpenSource\VisualFSharpOpenSource.csproj]
C:\dev\fsharp\packages\Microsoft.VSSDK.BuildTools.15.0.25929-RC2\tools\vssdk\Microsoft.VsSDK.targets(696,5): error MSB4018: at Microsoft.VsSDK.Build.Tasks.ExtensionManagerUtilities.UpdateLastExtensionsChange(SettingsManager settingsManager)\r [C:\dev\fsharp\vsintegration\Vsix\VisualFSharpOpenSource\VisualFSharpOpenSource.csproj]
C:\dev\fsharp\packages\Microsoft.VSSDK.BuildTools.15.0.25929-RC2\tools\vssdk\Microsoft.VsSDK.targets(696,5): error MSB4018: at Microsoft.VsSDK.Build.Tasks.EnableExtension.Execute()\r [C:\dev\fsharp\vsintegration\Vsix\VisualFSharpOpenSource\VisualFSharpOpenSource.csproj]
C:\dev\fsharp\packages\Microsoft.VSSDK.BuildTools.15.0.25929-RC2\tools\vssdk\Microsoft.VsSDK.targets(696,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()\r [C:\dev\fsharp\vsintegration\Vsix\VisualFSharpOpenSource\VisualFSharpOpenSource.csproj]
C:\dev\fsharp\packages\Microsoft.VSSDK.BuildTools.15.0.25929-RC2\tools\vssdk\Microsoft.VsSDK.targets(696,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() [C:\dev\fsharp\vsintegration\Vsix\VisualFSharpOpenSource\VisualFSharpOpenSource.csproj]

Any pointers?

@vasily-kirichenko
Copy link
Contributor

Yes, I've got the very same error on my branch after rebasing on current master.

@brettfo
Copy link
Member

brettfo commented Dec 8, 2016

Since the NRE is coming from the SDK I'm going to defer to @tinaschrepfer here.

@vasily-kirichenko
Copy link
Contributor

Why it is so important to make all these breaking stuff right in master?? Do it in a branch, then merge it into master when it's all green...

@forki
Copy link
Contributor

forki commented Dec 8, 2016

ouch. is the master build broken again?

@vasily-kirichenko
Copy link
Contributor

I don't know why this PR is green. I merged it into my branch and the error is still here.

@rojepp
Copy link
Contributor

rojepp commented Dec 8, 2016

@vasily-kirichenko Separate errors. The 'EnableExtension' part is probably not run on CI at all.

@vasily-kirichenko
Copy link
Contributor

@rojepp so the guys don't normally run build.cmd vs before pushing? Nice.

@forki
Copy link
Contributor

forki commented Dec 8, 2016

@KevinRansom @dsyme can someone please still merge this? red on master is really break our flow.

@vasily-kirichenko
Copy link
Contributor

@forki it does not help with VisualFSharp.sln because it fails, see the error above. This means F5/Ctrl+F5 does not work.

@forki
Copy link
Contributor

forki commented Dec 8, 2016 via email

@dsyme dsyme merged commit 8f81371 into master Dec 8, 2016
@dsyme
Copy link
Contributor Author

dsyme commented Dec 8, 2016

DeployExtension is false on CI, it's this step that's failing:

    <DeployExtension Condition=" '$(DeployExtension)' == '' and ('$(AppVeyor)' != '' or '$(HUDSON_COOKIE)' != '' or '$(UsingMicrobuild)' != '') ">False</DeployExtension>
    <DeployExtension Condition=" '$(DeployExtension)' == '' and '$(AppVeyor)' == '' and '$(HUDSON_COOKIE)' == '' and '$(UsingMicrobuild)' == '' ">True</DeployExtension>

@dsyme
Copy link
Contributor Author

dsyme commented Dec 8, 2016

This is the callstack for the failure in the DeployExtension task:

 	Microsoft.VsSDK.Build.Tasks.dll!Microsoft.VsSDK.Build.Tasks.ExtensionManagerUtilities.ConfigurationChangedReasonKey.get()	Unknown
>	Microsoft.VsSDK.Build.Tasks.dll!Microsoft.VsSDK.Build.Tasks.ExtensionManagerUtilities.UpdateLastExtensionsChange(Microsoft.VisualStudio.Settings.SettingsManager settingsManager)	Unknown
 	Microsoft.VsSDK.Build.Tasks.dll!Microsoft.VsSDK.Build.Tasks.EnableExtension.Execute()	Unknown
 	Microsoft.Build.dll!Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()	Unknown
 	Microsoft.Build.dll!Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask)	Unknown
 	mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.__Canon>.Start<Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26>(ref Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26 stateMachine)	Unknown

@dsyme
Copy link
Contributor Author

dsyme commented Dec 8, 2016

When installing the VSIX by hand using

VSIXInstaller.exe /a debug\net40\bin\VisualFSharpOpenSource.vsix

I get

capture15

Here's the log:

08/12/2016 12:57:49 - Microsoft VSIX Installer
08/12/2016 12:57:49 - -------------------------------------------
08/12/2016 12:57:49 - vsixinstaller.exe version:
08/12/2016 12:57:49 - 15.0.25920.0 built by: D15REL
08/12/2016 12:57:49 - -------------------------------------------
08/12/2016 12:57:49 - Command line parameters:
08/12/2016 12:57:49 - VSIXInstaller.exe,/a,debug\net40\bin\VisualFSharpOpenSource.vsix
08/12/2016 12:57:49 - -------------------------------------------
08/12/2016 12:57:49 - Microsoft VSIX Installer
08/12/2016 12:57:49 - -------------------------------------------
08/12/2016 12:57:49 - Initializing Install...
08/12/2016 12:57:49 - Extension Details...
08/12/2016 12:57:49 - 	Identifier         : VisualFSharp
08/12/2016 12:57:49 - 	Name               : Visual F# Tools
08/12/2016 12:57:49 - 	Author             : Microsoft.VisualFSharpTools
08/12/2016 12:57:49 - 	Version            : 15.4.1.9055
08/12/2016 12:57:49 - 	Description        : Deploy Visual F# Tools templates to Visual Studio
08/12/2016 12:57:49 - 	Locale             : en-US
08/12/2016 12:57:49 - 	MoreInfoURL        : 
08/12/2016 12:57:49 - 	InstalledByMSI     : False
08/12/2016 12:57:49 - 	SupportedFrameworkVersionRange : [4.6,)
08/12/2016 12:57:49 - 
08/12/2016 12:57:49 - 	SignatureState     : Unsigned
08/12/2016 12:57:49 - 	Supported Products : 
08/12/2016 12:57:49 - 		Microsoft.VisualStudio.Pro
08/12/2016 12:57:49 - 			Version : [15.0]
08/12/2016 12:57:49 - 
08/12/2016 12:57:49 - 	References         : 
08/12/2016 12:57:49 - 	Prerequisites      : 
08/12/2016 12:57:49 - 		-------------------------------------------------------
08/12/2016 12:57:49 - 		Identifier   : Microsoft.VisualStudio.Component.CoreEditor
08/12/2016 12:57:49 - 		Name         : Visual Studio core editor
08/12/2016 12:57:49 - 		Version      : [15.0,16.0)
08/12/2016 12:57:49 - 
08/12/2016 12:57:49 - Signature Details...
08/12/2016 12:57:49 - 	Extension is not signed.
08/12/2016 12:57:49 - 
08/12/2016 12:57:49 - Searching for applicable products...
08/12/2016 12:57:49 - Found installed product - Microsoft Visual Studio Enterprise 2015
08/12/2016 12:57:49 - Found installed product - Microsoft Visual Studio Professional 2015
08/12/2016 12:57:49 - Found installed product - Microsoft Visual Studio Community 2015
08/12/2016 12:57:49 - Found installed product - Microsoft Visual Studio 2015 Shell (Integrated)
08/12/2016 12:57:49 - Found installed product - Global Location
08/12/2016 12:57:49 - Found installed product - Visual Studio Professional 2017 RC
08/12/2016 12:57:51 - The extension with ID 'VisualFSharp' is not installed to Visual Studio Professional 2017 RC.
08/12/2016 12:58:05 - The following target products have been selected...
08/12/2016 12:58:05 - 	Visual Studio Professional 2017 RC
08/12/2016 12:58:05 - 
08/12/2016 12:58:06 - Beginning to install extension to Visual Studio Professional 2017 RC...
08/12/2016 12:58:06 - Install Error : System.InvalidOperationException: Vsix Catalog Invalid
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.PerformSetupEngineInstall(InstallableExtensionImpl extension, Boolean installPerMachine)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallInternal(InstallableExtensionImpl extension, InstallFlags installFlags, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, UInt64 totalBytesToWrite, UInt64& totalBytesWritten)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.BeginInstall(IInstallableExtension installableExtension, InstallFlags installFlags, AsyncOperation asyncOp)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallWorker(IInstallableExtension extension, InstallFlags installFlags, AsyncOperation asyncOp)

@dsyme
Copy link
Contributor Author

dsyme commented Dec 8, 2016

I'm wondering if this means the master branch will now only install into VS2017 RC2.... (Which is not publicly available yet, nor do I know how to get an early version inside MS)

@dsyme
Copy link
Contributor Author

dsyme commented Dec 8, 2016

@vasily-kirichenko @rojepp - if you are using VS2017 RC, please base your work on branch vs2017-rc. Do not pull master, but still send the PR to master. For example just do

git pull https://github.com/Microsoft/visualfsharp vs2017-rc

but don't do

git pull https://github.com/Microsoft/visualfsharp master

until you install RC2 when it comes out.

In more detail, this commit is the head of vs2017-rc and changes to the previous VSSDK and if you work from that commit you can deploy extensions into RC and debug them using F5 as before. This commit is in master too but I immediately reverted it so master is exactly as it was before. This means your PRs will integrate smoothly

@rojepp
Copy link
Contributor

rojepp commented Dec 8, 2016

So master is still broken for potential new contributors? It should be the other way around imho. The currently breaking changes should be in RC2 branch (which even seem to be named correctly for it! :) )

@dsyme
Copy link
Contributor Author

dsyme commented Dec 8, 2016

@vasily-kirichenko

I'm confused a bit about "if you are using VS2017 RC2". I thought RC2 is not released yet?

Sorry, I meant RC. I've adjust my comment above

@rojepp

So master is still broken for potential new contributors? It should be the other way around imho.

Yes, of course. However it's up to the Visual F# Tools team though and they are currently using master as the branch where they are getting these tools to work with RC2 (hopefully ready for release soon, or perhaps as part of RC3, I don't know) and it's like 5am in the morning there. We just have to live with it for today. What I've done is a way for you to continue to work on PRs while things land.

We've faced the same problem many times before (e.g. repo was only usable with VS2017, but VS2017 was only in Preview 1 or something and no one had it installed). The problems are an inherent part of shipping in Visual Studio but are becoming much less frequent because of the extensive use of CI against publicly available SDKs.

Please let me give an internal Microsoft perspective.

  • Their number 1 priority is to release this thing as part of Visual Studio as soon as feasible.
  • That means integrating with RC2 or RC3 or whatever train they can get on. If they miss the train they are stuffed.
  • RC got finalized and shipped several months ago, and they are likely in escrow mode for RC2. Everyone at Microsoft is already working on RC3.

So from the internal Microsoft perspective the focus is on integrating with RC2 or RC3. It's not on keeping master live and running on the soon-to-be-thrown-away RC.

I know that from the OSS perspective the number 1 priority is to keep master contributor-ready. But equally that can pile up huge integration pressure where the repo hasn't been properly used against latest VS releases (even internally), and by the time things get integrated it's too late to fix anything in VS.

Anyway, in general we've been pretty good at making this repo more contributor-ready. Please just accept this sort of thing as a normal part of shipping as part of Visual Studio.

@brettfo
Copy link
Member

brettfo commented Dec 8, 2016

tl;dr - I've fully reverted my breaking changes in master so you should be good to go again. Sorry about that.

Detailed Version

Continuing off of what @dsyme just said, I'm going to give out a little too much information, but my direct manager is out of the office until Monday, so maybe he'll forget by then :)

There are two issues that worked in concert to create this storm:

1. Setup Changes

There have been a lot of changes in VS recently around setup authoring (you've see this if you've installed VS "15" Preview 4 or later) and many of those changes were very late-breaking. E.g., the setup team would commonly send an email along the lines of "We've changed how 'X' works, so now each team needs to update their component by 'Y'" where 'Y' is two days from that email getting sent out.

One of these changes was in how F# creates VSIX packages, and the change on the F# end was to update the Microsoft.VSSDK.BuildTools package from version 15.0.25207-RC2 to 15.0.25929-RC2. The unfortunate thing is that in this case the VSIX produced can only be installed on RC2 builds of VS which isn't publically available yet.

2. F# Infrastructure Changes

In the past our F# infrastructure with regards to merging between public and internal-only branches and making the internal VS builds use newer F# bits was all manual and I ain't about that life. I updated some tools so that everything would happen automatically.

Where that got us

On the first day that the tools I mentioned in (2) above fully ran, there was also one of the changes that I mentioned in (1) which meant that internal VS builds couldn't use F# which in turn meant that internal VS builds were still using the F# bits from RC, and let's be honest, those weren't exactly the most stable. That kicked off a fire where I was trying to make F# great again install on VS because shipping VS2017-RC with barely functional F# support was bad, but shipping RC2 with the exact same bits was even worse.

Why I did what I did

Certain things I'm not allowed to say. Certain things like: we've been internally testing a build of VS that we wanted to release as RC2, but that version had the old F# bits from the first RC. I'm also not allowed to say that through some pleading we got some higher-ups to agree to push back the official RC2 build by a few days so that we could get newer F# bits in, so this got the clock ticking. Ideally I would have made these changes in another rc2 (or similar) branch so I didn't break everybody else, but the reality of it was twofold: (1) I didn't have time to setup internal branches and builds to support this in time for the RC2 cutoff, and (2) when I finally did get the internal RC2 stuff to work, it was late, I was tired, and I thought to myself "I'll fix this in the morning, nobody will know." Well, somebody found out, lots of somebodies.

What will be done in the future

In short, once the RC2 release calms down I'll be doing the work to create an alternate release or stabilization branch where these kinds of changes will happen and I'll also create the internal builds to handle this.

So again, sorry about that, but I think you'll like the outcome.

Ninja edit: master should be good to go and I've created a vs2017-rc2 branch that I'll merge into master once RC2 publically ships.

@dsyme
Copy link
Contributor Author

dsyme commented Dec 8, 2016

Thanks for the explanation @brettfo ! Good luck with getting the bits inserted :)

@rojepp
Copy link
Contributor

rojepp commented Dec 8, 2016

We don't often get an insight into the shit-ton of work that goes into this on your end.
Thanks for the write-up! Also great to hear that there will be a stable branch the next time around.

@forki
Copy link
Contributor

forki commented Dec 8, 2016

Thanks for being so open and thanks for all the hard work @brettfo. Kudos!

@vasily-kirichenko
Copy link
Contributor

Thanks for explanation!

@dsyme
Copy link
Contributor Author

dsyme commented Dec 8, 2016

was all manual and I ain't about that life.

We are with you in spirit, we are your brothers and sisters in this battle

I updated some tools so that everything would happen automatically.

Yes yes yes yes yes yea yes yes yes yes yes yes yes!

@brettfo
Copy link
Member

brettfo commented Dec 12, 2016

FYI, VS 2017 RC2 has now been publicly released. PR to update master (without breaking everybody) is at #1996.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants