-
Notifications
You must be signed in to change notification settings - Fork 0
Failing tests #10
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
Failing tests #10
Conversation
| CheckMultipleInputsInParallel(ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt, tcState, eagerFormat, inputs) | ||
| | TypeCheckingMode.Graph -> | ||
| | _ -> | ||
| // `tcConfig.typeCheckingConfig.Mode` is not set correctly for unit tests `Compile graph-based` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Mode was set to TypeCheckingMode.ParallelCheckingOfBackedImplFiles, even though the tests said compile {Method = Method.Graph; Project = project}.
I see they are not related but this was quite confusing as I was trying to add a failing unit test to draw out unsupported behaviour.
With this change, existing tests are not passing anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue was actually in setupCompilationMethod where I was setting the wrong value of typeCheckingMode. Have fixed this since.
| let json = JsonConvert.SerializeObject(graphJson, Formatting.Indented) | ||
| let path = $"c:/projekty/fsharp/heuristic/FCS.deps.json" | ||
| System.IO.File.WriteAllText(path, json) | ||
| // let graphJson = graph.Graph |> Seq.map (fun (KeyValue(file, deps)) -> file.Name, deps |> Array.map (fun d -> d.Name)) |> dict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really want to pull the branch and run the tests.
This isn't very pleasant.
| ] | ||
| |> FProject.Make CompileOutput.Library | ||
|
|
||
| let emptyImplementation = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some other thing is failing when running this test.
A KeyNotFound exception in let fsQualifiedName = asts[fsName].QualifiedName (ParallelTypeChecking.fs).
The point of this code base is that this should fail because A.fs isn't implementing A.fsi.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I saw that last night and fixed since. Thanks for reporting 👍
| try | ||
| let args = setupParsed config | ||
| let exit : int = CommandLineMain.mainAux(args, true, Some exiter) | ||
| let exit : int = CommandLineMain.mainAux2(args, true, Some exiter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code was not compiling after a pulling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
Oh, and please give |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all: apologies for suggesting to work on a common branch without first cleaning it up.
I believe the issues you mentioned should be now fixed.
I tried to get rid of references to certain folder structures, but one stayed - C:/Program Files/... in fsc args files - not sure how to get rid of that one.
I tested this branch as far as I was able to by running the following script:
git clone https://github.com/safesparrow/fsharp parallel-tc
cd parallel-tc
git checkout heuristic_otel
./build.cmd -pack -noVisualStudio
cd tests/ParallelTypeCheckingTests/tests
./FCS.prepare.ps1
# Open FSharp.sln in Rider
# Run all tests in ParallelTypeCheckingTestsAfter running this script, as long as you're running on Windows, all tests should be passing in Rider:

Any files it writes in tests it should write current directory.
If this doesn't work out-of-the-box, without any code changes, please let me know and I'll fix.
| CheckMultipleInputsInParallel(ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt, tcState, eagerFormat, inputs) | ||
| | TypeCheckingMode.Graph -> | ||
| | _ -> | ||
| // `tcConfig.typeCheckingConfig.Mode` is not set correctly for unit tests `Compile graph-based` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue was actually in setupCompilationMethod where I was setting the wrong value of typeCheckingMode. Have fixed this since.
| try | ||
| let args = setupParsed config | ||
| let exit : int = CommandLineMain.mainAux(args, true, Some exiter) | ||
| let exit : int = CommandLineMain.mainAux2(args, true, Some exiter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
| ] | ||
| |> FProject.Make CompileOutput.Library | ||
|
|
||
| let emptyImplementation = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I saw that last night and fixed since. Thanks for reporting 👍
|
Closing in favour of #11 |
Hello,
I tried to create a failing unit test for #9 because I think I may have found a solution/workaround.
It is currently still a quite frustrating experience to collaborate on this branch.
I'll leave some pointers in this PR.