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 project file name ordering with diamond dependencies #1363

Merged
merged 5 commits into from
Jul 21, 2016

Conversation

dsyme
Copy link
Contributor

@dsyme dsyme commented Jul 20, 2016

Fixes this problem #1362 by propagating this fix from FSharp.Compiler.Service

This is an important fix for a case in transitive dependencies that seems to have been missed.

@dsyme
Copy link
Contributor Author

dsyme commented Jul 20, 2016

The whole of ProjectOptionsTests.fs from FSharp.Compiler.Service is included, even though only the last test is actually active. The rest of the tests are for the ProjectCracker tool used by FSharp.Compiler.Service.

@dsyme dsyme force-pushed the fix-proj-filenames branch from 1e0f30c to 0d92803 Compare July 20, 2016 12:32
@dsyme
Copy link
Contributor Author

dsyme commented Jul 20, 2016

WE have failing tests after this change:

InteractiveSession\Misc (LoadingFsx.fsx) -- failed
InteractiveSession\Misc (LoadingFsx.fsscript) -- failed

1) Failed : FSharp-Tests-Core+Attributes.attributes(FSI_FILE)
Error running command 'D:\j\workspace\release_ci_pa---866fd2c3\tests\..\release\net40\bin\fsiAnyCPU.exe' with args ' -r:System.Core.dll --nowarn:20 --define:INTERACTIVE --maxerrors:1 --abortonerror testlib.fsi testlib.fs test.fsx' in directory 'D:\j\workspace\release_ci_pa---866fd2c3\tests\fsharp\core\attributes'. ERRORLEVEL 1 ERRORLEVEL 1
at NUnitConf.checkTestResult(Result`2 result) in D:\j\workspace\release_ci_pa---866fd2c3\tests\fsharp\nunitConf.fs:line 14

2) Failed : FSharp-Tests-Core+FSI-reload.fsi-reload
Error running command 'D:\j\workspace\release_ci_pa---866fd2c3\tests\..\release\net40\bin\fsiAnyCPU.exe' with args ' -r:System.Core.dll --nowarn:20 --define:INTERACTIVE --maxerrors:1 --abortonerror  --maxerrors:1 load2.fsx' in directory 'D:\j\workspace\release_ci_pa---866fd2c3\tests\fsharp\core\fsi-reload'. ERRORLEVEL 1 ERRORLEVEL 1
at NUnitConf.checkTestResult(Result`2 result) in D:\j\workspace\release_ci_pa---866fd2c3\tests\fsharp\nunitConf.fs:line 14

3) Failed : FSharp-Tests-Core+Load-Script.load-script
'D:\j\workspace\release_ci_pa---866fd2c3\tests\fsharp\core\load-script\out.stdout.txt' and 'D:\j\workspace\release_ci_pa---866fd2c3\tests\fsharp\core\load-script\out.stdout.bsl' differ; ["diff between [D:\j\workspace\release_ci_pa---866fd2c3\tests\fsharp\core\load-script\out.stdout.txt] and [D:\j\workspace\release_ci_pa---866fd2c3\tests\fsharp\core\load-script\out.stdout.bsl]";
 "line 45"; " - Test 10=================================================";
 " + Hello"]
at NUnitConf.checkTestResult(Result`2 result) in D:\j\workspace\release_ci_pa---866fd2c3\tests\fsharp\nunitConf.fs:line 14

4) Failed : FSharp-Tests-Core+Members+Basics.Basics(FSI_FILE)
Error running command 'D:\j\workspace\release_ci_pa---866fd2c3\tests\..\release\net40\bin\fsiAnyCPU.exe' with args ' -r:System.Core.dll --nowarn:20 --define:INTERACTIVE --maxerrors:1 --abortonerror test.fsi test.fs' in directory 'D:\j\workspace\release_ci_pa---866fd2c3\tests\fsharp\core\members\basics'. ERRORLEVEL 1 ERRORLEVEL 1
at NUnitConf.checkTestResult(Result`2 result) in D:\j\workspace\release_ci_pa---866fd2c3\tests\fsharp\nunitConf.fs:line 14

5) Failed : FSharp-Tests-Core+Reflect.reflect(FSI_FILE)
Error running command 'D:\j\workspace\release_ci_pa---866fd2c3\tests\..\release\net40\bin\fsiAnyCPU.exe' with args ' -r:System.Core.dll --nowarn:20 --define:INTERACTIVE --maxerrors:1 --abortonerror test.fs test2.fs' in directory 'D:\j\workspace\release_ci_pa---866fd2c3\tests\fsharp\core\reflect'. ERRORLEVEL 1 ERRORLEVEL 1
at NUnitConf.checkTestResult(Result`2 result) in D:\j\workspace\release_ci_pa---866fd2c3\tests\fsharp\nunitConf.fs:line 14

@dsyme
Copy link
Contributor Author

dsyme commented Jul 20, 2016

The investigation of these failures is in the comments of fsharp/fsharp-compiler-docs#594. We obviously need to fix them before we can consider this a good fix.

@@ -5042,7 +5045,7 @@ module private ScriptPreprocessClosure =
/// Used from fsi.fs and fsc.fs, for #load and command line
let GetFullClosureOfScriptFiles(tcConfig:TcConfig,files:(string*range) list,codeContext,_useDefaultScriptingReferences:bool,lexResourceManager:Lexhelp.LexResourceManager) =
let mainFile = fst (List.head files)
let protoClosure = files |> List.map (fun (filename,m)->SourceFileOfFilename(filename,m,tcConfig.inputCodePage)) |> List.concat |> List.rev // Reverse to put them in the order they will be extracted later
let protoClosure = files |> List.map (fun (filename,m)->SourceFileOfFilename(filename,m,tcConfig.inputCodePage)) |> List.concat // Reverse to put them in the order they will be extracted later
Copy link
Contributor

@alfonsogarciacaro alfonsogarciacaro Jul 20, 2016

Choose a reason for hiding this comment

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

As List.rev is now gone, should the comment // Reverse to put them in the order they will be extracted later be deleted too?

@dsyme
Copy link
Contributor Author

dsyme commented Jul 20, 2016

Now a different set of failure :(


LoadOrderOfExecution4.fs(1,9): error FS0039: The value or constructor 'y' is not defined
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution04_fsc) +++
Compiling: [fsc   --nologo aaa\bbb\RelativeHashRResolution04_1.fsx ]

aaa\bbb\RelativeHashRResolution04_1.fsx(8,14): error FS0039: The namespace or module 'RelativeHashRResolution04_2' is not defined
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution04_fscrelative) +++
Compiling: [fsc   --nologo ..\Misc\aaa\bbb\RelativeHashRResolution04_1.fsx ]

aaa\bbb\RelativeHashRResolution04_1.fsx(8,14): error FS0039: The namespace or module 'RelativeHashRResolution04_2' is not defined
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution04_fscsimple) +++
Compiling: [fsc   --nologo --simpleresolution --noframework -r:"D:\j\workspace\release_ci_pa---3f142ccc\tests\..\release\net40\bin\FSharp.Core.dll" aaa\bbb\RelativeHashRResolution04_1.fsx ]

aaa\bbb\RelativeHashRResolution04_1.fsx(8,14): error FS0039: The namespace or module 'RelativeHashRResolution04_2' is not defined
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution04_fscrelativesimple) +++
Compiling: [fsc   --nologo --simpleresolution --noframework -r:"D:\j\workspace\release_ci_pa---3f142ccc\tests\..\release\net40\bin\FSharp.Core.dll" ..\Misc\aaa\bbb\RelativeHashRResolution04_1.fsx ]

aaa\bbb\RelativeHashRResolution04_1.fsx(8,14): error FS0039: The namespace or module 'RelativeHashRResolution04_2' is not defined
Compile Unexpectedly Failed: 256 
FAIL


@dsyme
Copy link
Contributor Author

dsyme commented Jul 20, 2016

@alfonsogarciacaro Reworking the fix now

@dsyme dsyme force-pushed the fix-proj-filenames branch 3 times, most recently from 6c53c04 to 5fe0619 Compare July 20, 2016 23:13
@dsyme dsyme force-pushed the fix-proj-filenames branch from c0cb261 to 1b62cc8 Compare July 21, 2016 11:40
@dsyme dsyme merged commit 580e9ef into dotnet:master Jul 21, 2016
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.

3 participants