fsharp icon indicating copy to clipboard operation
fsharp copied to clipboard

Turn a bunch of options by default

Open vzarytovskii opened this issue 1 year ago • 11 comments

Attempt to enable some parallel options (graph checking, ilxgen, resolution) by default.

Firstly, based on local tests, parallel ilxgen causes a bunch of baselines to change. This either caused by sorting before emitting/generating, which is fine. Or it's caused by trully parallel generation, which will break determinism.

Secondly, graph checking causes some things in tests to be not found during test (i'd wait for CI, to see exact issue).

I am very hesitant to enable graph checking by default, since it might cause typechecker just to fail in places it wasn't before, there might be (and probably will be) a bunch of cases where it will surface. What we can do is to have an msbuild property which will allow people to test it on more projects (or ask them to use --test: flag).

Regarding the ilxgen - we need a proof that codegen order is expected. If it's not, it has to be fixed, or always been disabled for the determinism.

I didn't find any anomalies in both ParallelReferenceResolution and OptimizationProcessingMode.Parallel yet.

vzarytovskii avatar Jul 24 '24 13:07 vzarytovskii

:white_check_mark: No release notes required

github-actions[bot] avatar Jul 24 '24 13:07 github-actions[bot]

Thanks @vzarytovskii for looking into this. I failed in my attempt in https://github.com/dotnet/fsharp/pull/17400

edgarfgp avatar Jul 24 '24 13:07 edgarfgp

A bunch of tests currently failing:

  1. Some fsi tests are failing because of locked dlls (I presume it's because parallel resolution)
  2. Some resolution tests are failing (it's either resolution or graph checking):
test3.fsx(109,106): error FS0001: The type 'TheGeneratedType5' is not compatible with the type 'Test2a.PublicGenerativeTypes.TheGeneratedType5'
  1. A test for same type in the different references is failing (due to either parallel resolution, or graph checking).

I will turn parallel resolution off and see what still fails.

vzarytovskii avatar Jul 24 '24 14:07 vzarytovskii

Majority of issues were due to parallel resolution it seems. Still doesn't explain why do I have weird issues in tests locally, but not in CI.

It's good. I will leave parallel ilxgen and resolution off, and graph type checking and optimization on, and leave it up to @KevinRansom and @T-Gro to decide whether we want them on by default. The latter should be fine, the former - we didn't test on many solutions (maybe 3-5 in the wild), so there's always a risk of things going wrong. There's now an opt-out mechanism though.

vzarytovskii avatar Jul 24 '24 15:07 vzarytovskii

Majority of issues were due to parallel resolution it seems. Still doesn't explain why do I have weird issues in tests locally, but not in CI.

It's good. I will leave parallel ilxgen and resolution off, and graph type checking and optimization on, and leave it up to @KevinRansom and @T-Gro to decide whether we want them on by default. The latter should be fine, the former - we didn't test on many solutions (maybe 3-5 in the wild), so there's always a risk of things going wrong. There's now an opt-out mechanism though.

This exists already: parallelIlxGenEnabled = tcConfig.parallelIlxGen && not tcConfig.deterministic

i.e. deterministic builds should not be affected.

T-Gro avatar Jul 26 '24 11:07 T-Gro

This is ready, apart from some output tests which will likely be failing. @nojaf @edgarfgp @dawedawe does this make sense to enable those options now, and the rest later? I need to investigate those a bit more. With these though, we will be having an opt-out at least.

vzarytovskii avatar Aug 12 '24 18:08 vzarytovskii

@T-Gro @KevinRansom @abonie @psfinaki I need a sanity check on it. Also, a sign-off.

vzarytovskii avatar Aug 12 '24 20:08 vzarytovskii

So, two things broke when turning this on by default

  1. First looks like graph checking in topinit test:

https://github.com/dotnet/fsharp/blob/c9bed7992880912f119baa0124cdb05f3d36d6a2/tests/fsharp/tests.fs#L1488

https://github.com/dotnet/fsharp/blob/c9bed7992880912f119baa0124cdb05f3d36d6a2/tests/fsharp/core/topinit/app69514.fs#L1-L5

https://github.com/dotnet/fsharp/blob/c9bed7992880912f119baa0124cdb05f3d36d6a2/tests/fsharp/core/topinit/lib69514.fs#L1-L13

Fails with:

app69514.fs(3,16): error FS0039: The value, namespace, type or module 'Lib' is not defined.


app69514.fs(5,17): error FS0039: The value, namespace, type or module 'Lib' is not defined.

  1. Not entirely sure yet, but also related to types resolution in diamondAssembly type provider test:

https://github.com/dotnet/fsharp/blob/c9bed7992880912f119baa0124cdb05f3d36d6a2/tests/fsharp/TypeProviderTests.fs#L39-L41

test3.fsx(96,70): error FS0001: The type 'Test2a.PublicGenerativeTypes.TheGeneratedType5' is not compatible with the type 'Test1.PublicGenerativeTypes.TheGeneratedType5'


test3.fsx(96,105): error FS0001: The type 'Test2a.PublicGenerativeTypes.TheGeneratedType5' is not compatible with the type 'Test1.PublicGenerativeTypes.TheGeneratedType5'


test3.fsx(97,70): error FS0001: The type 'Test2a.PublicGenerativeTypes.TheGeneratedType5' is not compatible with the type 'Test1.PublicGenerativeTypes.TheGeneratedType5'


test3.fsx(98,70): error FS0001: The type 'Test2a.PublicGenerativeTypes.TheGeneratedType5' is not compatible with the type 'Test1.PublicGenerativeTypes.TheGeneratedType5'


test3.fsx(98,105): error FS0001: The type 'Test2b.PublicGenerativeTypes.TheGeneratedType5' is not compatible with the type 'Test1.PublicGenerativeTypes.TheGeneratedType5'


test3.fsx(99,70): error FS0001: The type 'Test2a.PublicGenerativeTypes.TheGeneratedType5' is not compatible with the type 'Test1.PublicGenerativeTypes.TheGeneratedType5'


test3.fsx(101,70): error FS0001: The type 'Test2b.PublicGenerativeTypes.TheGeneratedType5' is not compatible with the type 'Test1.PublicGenerativeTypes.TheGeneratedType5'


test3.fsx(101,105): error FS0001: The type 'Test2a.PublicGenerativeTypes.TheGeneratedType5' is not compatible with the type 'Test1.PublicGenerativeTypes.TheGeneratedType5'


test3.fsx(102,70): error FS0001: The type 'Test2b.PublicGenerativeTypes.TheGeneratedType5' is not compatible with the type 'Test1.PublicGenerativeTypes.TheGeneratedType5'


test3.fsx(103,70): error FS0001: The type 'Test2b.PublicGenerativeTypes.TheGeneratedType5' is not compatible with the type 'Test1.PublicGenerativeTypes.TheGeneratedType5'


test3.fsx(103,105): error FS0001: The type 'Test2b.PublicGenerativeTypes.TheGeneratedType5' is not compatible with the type 'Test1.PublicGenerativeTypes.TheGeneratedType5'


test3.fsx(104,70): error FS0001: The type 'Test2b.PublicGenerativeTypes.TheGeneratedType5' is not compatible with the type 'Test1.PublicGenerativeTypes.TheGeneratedType5'


test3.fsx(107,106): error FS0001: The type 'Test1.PublicGenerativeTypes.TheGeneratedType5' is not compatible with the type 'Test2a.PublicGenerativeTypes.TheGeneratedType5'


test3.fsx(109,106): error FS0001: The type 'TheGeneratedType5' is not compatible with the type 'Test2a.PublicGenerativeTypes.TheGeneratedType5'


test3.fsx(112,106): error FS0001: The type 'Test1.PublicGenerativeTypes.TheGeneratedType5' is not compatible with the type 'Test2a.PublicGenerativeTypes.TheGeneratedType5'


test3.fsx(114,106): error FS0001: The type 'TheGeneratedType5' is not compatible with the type 'Test2a.PublicGenerativeTypes.TheGeneratedType5'


Results: https://dev.azure.com/dnceng-public/public/_build/results?buildId=778074&view=ms.vss-test-web.build-test-results-tab&runId=19935626&resultId=100551&paneView=debug

@nojaf any pointers what to look at in this case?

vzarytovskii avatar Aug 16 '24 14:08 vzarytovskii

@vzarytovskii , I'm gonna teach you a little trick, add the scenario to https://github.com/dotnet/fsharp/blob/c9bed7992880912f119baa0124cdb05f3d36d6a2/tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/Scenarios.fs#L39

and then run https://github.com/dotnet/fsharp/blob/c9bed7992880912f119baa0124cdb05f3d36d6a2/tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/CompilationTests.fs#L49-L55

if sequential passes and graph doesn't then it is indeed a graph problem.

I need to go now, but I can look into this on Monday. Initial gut feeling is that we need to strip \global`` in:

SynLongIdent.SynLongIdent(
                                                id = [
                                                    Ident("`global`", R("(2,9--2,15)"))
                                                    Ident("Lib", R("(2,16--2,19)"))
                                                    Ident("File1", R("(2,20--2,25)"))
                                                    Ident("discState", R("(2,26--2,35)"))
                                                    Ident("Second", R("(2,36--2,42)"))
                                                ],
                                                dotRanges = [ R("(2,15--2,16)"); R("(2,19--2,20)"); R("(2,25--2,26)"); R("(2,35--2,36)") ],
                                                trivia = [ Some(IdentTrivia.OriginalNotation("global")); None; None; None; None ]
                                            ),

nojaf avatar Aug 16 '24 15:08 nojaf

Initial gut feeling is that we need to strip \global`` in:

This what I initially noticed in the test. Let me try and tinker with it.

vzarytovskii avatar Aug 16 '24 15:08 vzarytovskii

Added test here: https://github.com/dotnet/fsharp/pull/17553, will look at fixing it (need to learn a bit more about how graph checking works).

vzarytovskii avatar Aug 16 '24 17:08 vzarytovskii

Hi @vzarytovskii is the plan still to have this for November?

nojaf avatar Sep 13 '24 07:09 nojaf

Hi @vzarytovskii is the plan still to have this for November?

I will try to wrap it, but it might have to do in the following release. Too many issues with this release and didn't have time to finish this one :(

vzarytovskii avatar Sep 13 '24 08:09 vzarytovskii

following release

Would that be minor or major?

nojaf avatar Sep 13 '24 09:09 nojaf

following release

Would that be minor or major?

Minor, as soon as sdk freeze is lifted

vzarytovskii avatar Sep 13 '24 09:09 vzarytovskii

Ok, probably not going to make it till EOD, there are some fixes need to be made to the graph checking, will look at those:

+++ Conformance\ImplementationFilesAndSignatureFiles\CheckingOfImplementationFiles (E-SignatureAfterSource) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc    E-SignatureAfterSource.fs E-SignatureAfterSource.fsi 
Exit code: 1
Error:     2
Microsoft (R) F# Compiler version 12.9.100.0 for F# 9.0
Copyright (c) Microsoft Corporation. All Rights Reserved.
(4,8): error FS0248: Two modules named 'E-SignatureAfterSource' occur in two parts of this assembly
(8,1): warning FS0221: The declarations in this file will be placed in an implicit module 'E-SignatureAfterSource' based on the file name 'E-SignatureAfterSource.fsi'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file.
--------------------------------------------------------
Microsoft (R) F# Compiler version 12.9.100.0 for F# 9.0
Copyright (c) Microsoft Corporation. All Rights Reserved.
(4,8): error FS0248: Two modules named 'E-SignatureAfterSource' occur in two parts of this assembly
(8,1): warning FS0221: The declarations in this file will be placed in an implicit module 'E-SignatureAfterSource' based on the file name 'E-SignatureAfterSource.fsi'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file.

*** The following necessary lines were never matched:
***	\(8,1\):.+error FS0238:.+An implementation of file or module 'E-SignatureAfterSource' has already been given\. Compilation order is significant in F# because of type inference\. You may need to adjust the order of your files to place the signature file before the implementation\. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer

+++ InteractiveSession\Misc (VerbatimIdentifier01.fsx) +++
Compiling: [fsiAnyCPU<VerbatimIdentifier01.fsx   --nologo ]
Quantifier follows nothing in regex; marked by <-- HERE in m/val ``(+ <-- HERE )`` : bool = true/ at D:\a\_work\1\s\tests\fsharpqa\source\run.pl line 212.
+++ InteractiveSession\Misc (RelativeHashRResolution01_fsc) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo ccc\RelativeHashRResolution01_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution01_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo ccc\RelativeHashRResolution01_1.fsx ]

ccc\RelativeHashRResolution01_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution01_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution02_fsc) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo ccc\RelativeHashRResolution02_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution02_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo ccc\RelativeHashRResolution02_1.fsx ]

ccc\RelativeHashRResolution02_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution02_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution03_fsc) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo ccc\RelativeHashRResolution03_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution03_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo ccc\RelativeHashRResolution03_1.fsx ]

ccc\RelativeHashRResolution03_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution03_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution04_fsc) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo aaa\bbb\RelativeHashRResolution04_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution04_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo aaa\bbb\RelativeHashRResolution04_1.fsx ]

aaa\bbb\RelativeHashRResolution04_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution04_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution05_fsc) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo aaa\bbb\RelativeHashRResolution05_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution05_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo aaa\bbb\RelativeHashRResolution05_1.fsx ]

aaa\bbb\RelativeHashRResolution05_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution05_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution01_fscrelative) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo ..\Misc\ccc\RelativeHashRResolution01_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution01_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo ..\Misc\ccc\RelativeHashRResolution01_1.fsx ]

ccc\RelativeHashRResolution01_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution01_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution02_fscrelative) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo ..\Misc\ccc\RelativeHashRResolution02_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution02_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo ..\Misc\ccc\RelativeHashRResolution02_1.fsx ]

ccc\RelativeHashRResolution02_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution02_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution03_fscrelative) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo ..\Misc\ccc\RelativeHashRResolution03_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution03_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo ..\Misc\ccc\RelativeHashRResolution03_1.fsx ]

ccc\RelativeHashRResolution03_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution03_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution04_fscrelative) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo ..\Misc\aaa\bbb\RelativeHashRResolution04_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution04_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo ..\Misc\aaa\bbb\RelativeHashRResolution04_1.fsx ]

aaa\bbb\RelativeHashRResolution04_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution04_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution05_fscrelative) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo ..\Misc\aaa\bbb\RelativeHashRResolution05_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution05_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo ..\Misc\aaa\bbb\RelativeHashRResolution05_1.fsx ]

aaa\bbb\RelativeHashRResolution05_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution05_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution01_fscsimple) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ccc\RelativeHashRResolution01_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution01_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ccc\RelativeHashRResolution01_1.fsx ]

ccc\RelativeHashRResolution01_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution01_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution02_fscsimple) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ccc\RelativeHashRResolution02_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution02_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ccc\RelativeHashRResolution02_1.fsx ]

ccc\RelativeHashRResolution02_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution02_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution03_fscsimple) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ccc\RelativeHashRResolution03_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution03_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ccc\RelativeHashRResolution03_1.fsx ]

ccc\RelativeHashRResolution03_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution03_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution04_fscsimple) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" aaa\bbb\RelativeHashRResolution04_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution04_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" aaa\bbb\RelativeHashRResolution04_1.fsx ]

aaa\bbb\RelativeHashRResolution04_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution04_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution05_fscsimple) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" aaa\bbb\RelativeHashRResolution05_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution05_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" aaa\bbb\RelativeHashRResolution05_1.fsx ]

aaa\bbb\RelativeHashRResolution05_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution05_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution01_fscrelativesimple) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ..\Misc\ccc\RelativeHashRResolution01_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution01_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ..\Misc\ccc\RelativeHashRResolution01_1.fsx ]

ccc\RelativeHashRResolution01_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution01_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution02_fscrelativesimple) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ..\Misc\ccc\RelativeHashRResolution02_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution02_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ..\Misc\ccc\RelativeHashRResolution02_1.fsx ]

ccc\RelativeHashRResolution02_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution02_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution03_fscrelativesimple) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ..\Misc\ccc\RelativeHashRResolution03_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution03_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ..\Misc\ccc\RelativeHashRResolution03_1.fsx ]

ccc\RelativeHashRResolution03_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution03_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution04_fscrelativesimple) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ..\Misc\aaa\bbb\RelativeHashRResolution04_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution04_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ..\Misc\aaa\bbb\RelativeHashRResolution04_1.fsx ]

aaa\bbb\RelativeHashRResolution04_1.fsx(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution04_2' is not defined.
Compile Unexpectedly Failed: 256 
FAIL
+++ InteractiveSession\Misc (RelativeHashRResolution05_fscrelativesimple) +++
--------------------------------------------------------
Results from hosted compiler
msg: Compiling
cmd: fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ..\Misc\aaa\bbb\RelativeHashRResolution05_1.fsx 
Exit code: 1
Error:     0
(8,14): error FS0039: The value, namespace, type or module 'RelativeHashRResolution05_2' is not defined.
--------------------------------------------------------
Compiling: [fsc   --nologo --simpleresolution --noframework -r:"D:\a\_work\1\s\artifacts\bin\fsc\Release\net472\FSharp.Core.dll" ..\Misc\aaa\bbb\RelativeHashRResolution05_1.fsx ]

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




vzarytovskii avatar Sep 13 '24 12:09 vzarytovskii

What tests are you running there? Is that only using graph-based checking or all settings?

nojaf avatar Sep 13 '24 12:09 nojaf

What tests are you running there? Is that only using graph-based checking or all settings?

Those are fsharpqa tests, RelativeHashRResolution01_1.fsx (and others from log, there are a few files there, mostly I see fsx files), it's all settings which are on by default now - graph checking and parallel optimizations.

Seems like many of them are related to relative # resolution ("#I/#r" I presume?).

vzarytovskii avatar Sep 13 '24 12:09 vzarytovskii

Could you try and just run it with graph checking. I'm wondering if that really is the culprit.

nojaf avatar Sep 13 '24 12:09 nojaf

Could you try and just run it with graph checking. I'm wondering if that really is the culprit.

Will try it, but it's unlikely an optimizer, since the issues are during checking and resolution. Optimizer ones would've popped up at a later phase. Also i think that by default fsharpqa is compiling debug/without optimizations. I will double check it though.

vzarytovskii avatar Sep 13 '24 13:09 vzarytovskii

Superseded by https://github.com/dotnet/fsharp/pull/17948

vzarytovskii avatar Nov 01 '24 17:11 vzarytovskii

Maybe it's nothing but it caught my eye, so I'll put it here before I forget: This cancels immediately: https://github.com/dotnet/fsharp/blob/658b2451860c07ae33fa787bf0d79717c1983dcb/src/Compiler/Driver/GraphChecking/GraphProcessing.fs#L113-L115 to signal things are done IIUC.

But it is called here: https://github.com/dotnet/fsharp/blob/658b2451860c07ae33fa787bf0d79717c1983dcb/src/Compiler/Driver/GraphChecking/GraphProcessing.fs#L146-L147 after queueNode started some work with Async.Start: https://github.com/dotnet/fsharp/blob/658b2451860c07ae33fa787bf0d79717c1983dcb/src/Compiler/Driver/GraphChecking/GraphProcessing.fs#L117-L118 I wonder if maybe some things are not really done when the cancellation happens?

majocha avatar Nov 01 '24 18:11 majocha