Skip to content
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

EventSource source generator should mark both source and IL as autogenerated #64563

Closed
danmoseley opened this issue Jan 31, 2022 · 2 comments · Fixed by #64579
Closed

EventSource source generator should mark both source and IL as autogenerated #64563

danmoseley opened this issue Jan 31, 2022 · 2 comments · Fixed by #64579

Comments

@danmoseley
Copy link
Member

Per #64541, it should emit <autogenerated> into the source and also [GeneratedCodeAttribute...] for the IL.

Our other generators do this; this enables tooling and servicing scenarios.

eg regex generator

private static readonly string s_generatedCodeAttribute = $"[global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"{typeof(RegexGenerator).Assembly.GetName().Name}\", \"{typeof(RegexGenerator).Assembly.GetName().Version}\")]";
/// <summary>Header comments and usings to include at the top of every generated file.</summary>
private static readonly string[] s_headers = new string[]
{
"// <auto-generated/>",

@ghost
Copy link

ghost commented Jan 31, 2022

Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti, @safern
See info in area-owners.md if you want to be subscribed.

Issue Details

Per #64541, it should emit <autogenerated> into the source and also [GeneratedCodeAttribute...] for the IL.

Our other generators do this; this enables tooling and servicing scenarios.

eg regex generator

private static readonly string s_generatedCodeAttribute = $"[global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"{typeof(RegexGenerator).Assembly.GetName().Name}\", \"{typeof(RegexGenerator).Assembly.GetName().Version}\")]";
/// <summary>Header comments and usings to include at the top of every generated file.</summary>
private static readonly string[] s_headers = new string[]
{
"// <auto-generated/>",

Author: danmoseley
Assignees: -
Labels:

area-System.Diagnostics.Tracing

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jan 31, 2022
@teo-tsirpanis
Copy link
Contributor

I'm working on it.

teo-tsirpanis added a commit to teo-tsirpanis/dotnet-runtime that referenced this issue Jan 31, 2022
@ghost ghost added in-pr There is an active PR which will close this issue when it is merged and removed in-pr There is an active PR which will close this issue when it is merged labels Jan 31, 2022
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jan 31, 2022
@tommcdon tommcdon added this to the 7.0.0 milestone Feb 1, 2022
@tommcdon tommcdon removed the untriaged New issue has not been triaged by the area owner label Feb 1, 2022
teo-tsirpanis added a commit to teo-tsirpanis/dotnet-runtime that referenced this issue Mar 17, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Mar 18, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Apr 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.