-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Turn on ref assemblies in all projects #21346
Conversation
@jcouv Looks like trying to run the ref assemblies as unit tests ends poorly. ;-) More seriously, which build did you test this with? Are there any workarounds that we would need the team to know about to enable this? |
@@ -22,6 +22,7 @@ | |||
<RoslynPortableTargetFrameworks>net46;netcoreapp2.0</RoslynPortableTargetFrameworks> | |||
|
|||
<Features>strict,IOperation</Features> | |||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly> |
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.
📝 It is my understanding that this property alone doesn't really do anything. In order to truly test the end-to-end, we need to add the following as well:
<CompileUsingReferenceAssemblies>true</CompileUsingReferenceAssemblies>
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.
➡️ Looks like this is not necessary:
If you encounter a problem using reference assemblies, you can set the boolean property CompileUsingReferenceAssemblies to false to avoid using ref assemblies even if the projects you reference produce them. This is unset by default and only ever checked against false. It is only there to provide an emergency escape hatch; a customer who hits a bug can set it to false and avoid the new codepaths.
@jasonmalinowski The last time I tested this was with private fix from Sam (#20833), which I think went into preview 4 (I'd have to double-check). |
I think the issue here is we use a wildcard path to discover the xunit test assemblies. If you compare say this build output (new) with this build output (old), you can see that adding this flag resulted in many additional test assemblies getting discovered. We need to disable attempts to run the xunit test runner on reference assemblies. |
@jcouv You need to add a new exclusion like this one. |
build/scripts/build.ps1
Outdated
@@ -347,6 +347,10 @@ function Test-XUnit() { | |||
# Exclude out the multi-targetted netcore app projects | |||
$dlls = $dlls | ?{ -not ($_.FullName -match ".*netcoreapp.*") } | |||
|
|||
# Exclude out the ref assemblies | |||
$dlls = $dlls | ?{ -not ($_.FullName -match ".*\ref\.*") } |
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.
📝 If this is regular expressions, these need to use \\
.
windows_release_unit32_prtest failed in Microsoft.CodeAnalysis.Editor.UnitTests.LinkedFiles.LinkedFileDiffMergingEditorTests.TestCodeActionPreviewAndApply (details) FYI @dotnet/roslyn-infrastructure |
windows_debug_unit32_prtest failed with error below (details)
|
test windows_debug_unit32_prtest please |
test windows_release_unit32_prtest please |
Updated the regexes with proper escape sequences. Thanks @sharwell |
…-literal-text * dotnet/features/ioperation: Fix NamedArgumentInParameterOrderWithDefaultValue test for new IOperation output. EnC and EE cleanup (dotnet#21226) Fix crash when encountering a parenthesized expression when converting an if to a switch. this makes OOM to crash OOP process. this won't crash VS, instead it will show info bar and notify users to close VS and re-open. Turn on ref assemblies in all projects (dotnet#21346) Re-baseline some emit tests Move MakeFrames logic into Analysis Use langver=latest for scripting (dotnet#21331) Enable skipped tests and fix them (dotnet#21335) Replace project reference with linked file removed left out from deleted esent code.
This dogfoods the end-to-end ref assembly feature in the Roslyn repo.
Some scenarios may be broken (likely LUT and LSL), but the main scenarios have been verified already (for instance, P2P references have been patched, TDD still works).
Relates to #20418
@dotnet/roslyn-infrastructure @jaredpar for review.
FYI @rainersigwald @panopticoncentral @sharwell @Pilchie @ManishJayaswal