-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[Work items] Refining ref assemblies #17612
Comments
I have a lot of thoughts on this. Should we use this issue to track things, or should we create a new one? Thanks! |
Nice. Feel free to edit the description (first post), adding details. If possible, describe as pass/fail scenarios that we can check off. |
@CyrusNajmabadi I would further encourage you to suggest more tests on the open PR #17558 |
One case to keep in mind is structs and http://blog.paranoidcoding.com/2016/02/15/are-private-members-api-surface.html I think with a little work though we can boil it down to a few easy rules to keep the surface area around structs small. |
Small CSI script for manual checking of assembly timestamps, for later use: IEnumerable<string> ListFiles(string path)
{
foreach (var f in Directory.EnumerateFiles(path, "*.dll", SearchOption.AllDirectories)
.Concat(Directory.EnumerateFiles(path, "*.exe", SearchOption.AllDirectories)))
{
if (f.Contains("obj")) continue;
var timestamp = new FileInfo(f).LastWriteTime;
yield return timestamp + " - " + f;
}
}
void Print()
{
foreach (var f in ListFiles("C:\\repos\\Client\\"))
{
Console.WriteLine(f);
}
} |
In the two scenarios I benchmarked, ref assemblies saved ~70% of the time in incremental build. The first scenario I benchmarked is building a Roslyn IDE test project from the command-line, and making an non-public compiler change. (Anti-virus turned off,
The second scenario was building a compiler test project, and making an non-public compiler change. (Anti-virus turned off,
|
Ref assemblies should have the minimum amount of stuff to preserve the compile-time behavior of consumers. Some metadata should not be emitted in ref assemblies and some diagnostics should not affect emitting ref assemblies.
C# 7.1 scope
IsReadOnlyAttribute
)or typesshould not change ref assemblies.csc /refonly
should still produce a ref assembly if there is a semantic error in a method body./addmodule
(answer: not supported with /refout or /refonly)ReferenceAssemblyAttribute
attribute (during emit phase)csc /refout
should produce no assembly, but (at some point) may produce a ref assembly anyways. (no, we decided against partial success)IDS_CSCHelp
)Future/extended scope:
Remaining integration issues for 15.5 are tracked by #20418
The list of future refinements was moved to #19994
References
The text was updated successfully, but these errors were encountered: