Skip to content

Make roslyn the default compiler for test cases#996

Merged
marek-safar merged 1 commit into
dotnet:masterfrom
Unity-Technologies:compile-with-roslyn-by-default
Mar 12, 2020
Merged

Make roslyn the default compiler for test cases#996
marek-safar merged 1 commit into
dotnet:masterfrom
Unity-Technologies:compile-with-roslyn-by-default

Conversation

@mrvoorhe
Copy link
Copy Markdown
Contributor

Using the CodeDomCompiler has been a constant source of windows only test failures being introduced.

I believe the reason CodeDomCompiler was still sticking around was because it was faster than roslyn but with server mode now widely supported and so many of our tests simply depending on roslyn now I don't think there is any advantage to using CodeDomCompiler anymore.

We switch to using roslyn by default a long time ago and it's been seamless so I expect making this same change upstream will be seamless as well.

Note that I did add /shared to our csc command line now. Without it, roslyn is noticeably slowing than CodeDomCompiler.

Note that with this change we could remove the [SetupCSharpCompilerToUse("csc")] and compilerToUse: "csc" usages in the tests. I did not do that as part of this PR because

  • They are harmless to leave in.
  • There are a lot of them
  • If there is some undesirable side effect of this change then I didn't want to have invested the time in removing them.

If this change lands and all is fine for awhile then I will clean up the tests in follow on PR.

Using the CodeDomCompiler has been a constant source of windows only test failures being introduced.

I believe the reason CodeDomCompiler was still sticking around was because it was faster than roslyn but with server mode now widely supported and so many of our tests simply depending on roslyn now I don't think there is any advantage to using CodeDomCompiler anymore.

We switch to using roslyn by default a long time ago and it's been seamless so I expect making this same change upstream will be seamless as well.

Note that I did add /shared to our csc command line now.  Without it, roslyn is noticeably slowing than CodeDomCompiler.
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.

2 participants