Bug 35579 - Recent xbuild changes result in breakages to F# compiler tools
Summary: Recent xbuild changes result in breakages to F# compiler tools
Alias: None
Product: Installers
Classification: Mono
Component: General ()
Version: 4.2.0 (C6)
Hardware: PC Mac OS
: --- normal
Target Milestone: 4.2.0 (C6)
Assignee: Rodrigo Kumpera
Depends on:
Reported: 2015-11-05 10:09 UTC by Dave Thomas
Modified: 2015-11-09 15:05 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Dave Thomas 2015-11-05 10:09:16 UTC
In the current mono on the alpha channel (Mono JIT compiler version 4.2.1 (explicit/8862921 Thu Oct 29 17:09:16 EDT 2015))

The following change: https://github.com/mono/mono/commit/76c6a08e730393927b6851709cdae1d397cbcc3a#diff-59afd196a55d61d5d1eaaef7bd49d1e5

has resulted in a change of behaviour to xbuild where the msbuild task ResolveReferences now no longer populates the ChildProjectReferences item, this mean project reference are no longer returned and type checking on project reference will fail resulting in no tooltips or auto completion data.

The following unit tests in Fsharp.Compiler.Service now fail due to project references no longer returning then output dll.

Project file parsing -- 2nd level references 
  Expected: "Found 'Test1.dll'"
Actual: "Failed to find 'Test1.dll'"
  Expected string length 17 but was 26. Strings differ at index 1.
  Expected: "Found 'Test1.dll'"
  But was:  "Failed to find 'Test1.dll'"

Project file parsing -- multi language project
  Expected: "Found 'ConsoleApplication2.exe'"
Actual: "Failed to find 'ConsoleApplication2.exe'"
  Expected string length 31 but was 40. Strings differ at index 1.
  Expected: "Found 'ConsoleApplication2.exe'"
  But was:  "Failed to find 'ConsoleApplication2.exe'"

Project file parsing -- reference project output file
  Expected: collection containing "/Users/dave/code/FCS/tests/service/data/DifferingOutputDir/Dir1/OutputDir1/Test1.dll"
  But was:  "/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/gac/FSharp.Core/", "/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.0/mscorlib.dll", "/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.0/System.dll", "/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.0/System.Core.dll" 

Example project and tests are located here in FSharp.Compiler.Service.

With the actual unit tests themselves being here: https://github.com/fsharp/FSharp.Compiler.Service/blob/master/tests/service/ProjectOptionsTests.fs#L152-L163
Comment 1 Rodrigo Kumpera 2015-11-06 11:15:55 UTC
David Karlas posted a PR to fix this: https://github.com/mono/mono/pull/2202. It was merged and I believe it fixes your problems. 

You can pick a build from internal wrench in the meanwhile.
Comment 2 Jason Imison 2015-11-09 15:04:36 UTC
Confirmed fixed in this build

20:02 $ mono --version
Mono JIT compiler version 4.2.1 (explicit/6dd2d0d Fri Nov  6 12:25:19 EST 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  x86
	Disabled:      none
	Misc:          softdebug
	LLVM:          yes(3.6.0svn-mono-(detached/a173357)
	GC:            sgen