Skip to content

Conversation

@mhoogveld
Copy link
Contributor

Adding the header to generated .cs files will cause them to be ignored by Visual Studio's code-inspection, which will speed up the IDE.
Also changed to file-extension from *.cs to *.g.cs, which has exactly the same result in Visual Studio, but can also be used by other tools (e.g. Git's .gitignore or Visual Studio's .editorconfig)

The *.g.cs extension is mentioned in various places and is used since VS 2008 or earlier, but there does not seem to be any official documentation.
The best reference I found regarding the extension is https://developers.google.com/protocol-buffers/docs/reference/csharp-generated

@mjpt777 mjpt777 requested a review from JPWatson August 25, 2020 08:08
@mjpt777
Copy link
Contributor

mjpt777 commented Aug 25, 2020

@billsegall Do you have a view on this?

@billsegall
Copy link
Contributor

billsegall commented Aug 25, 2020 via email

@mjpt777
Copy link
Contributor

mjpt777 commented Aug 26, 2020

Please ensure the build passes all tests before submitting.

…e top of each generated C# file.

Auto-generated files are not included in automatic code-cleanup and/or inspection processes.
Like the auto-generated tag in the file's header, this causes files to be recognized as auto-generated code by Visual Studio.
An added bonus of the filename change is that these files can be treated differently based on the filename in your project's .gitignore or .editorconfig files
@mhoogveld mhoogveld force-pushed the csharp-autogenerated-header branch from 553c40a to 09d1811 Compare September 7, 2020 10:39
@mhoogveld
Copy link
Contributor Author

@billsegall I'm not sure what .gitignore file(s) you refer to.
The .gitignore in the root directory already includes all generated c# code in /csharp/sbe-generated by ignoring directories themselves or *.cs files in them (which also include the *.g.cs files of course)

@mjpt777 If I'm correct, the failing test already fails in the commit in the master on which this branch is based.
Would you like me to to rebase this branch onto another existing commit?

@mhoogveld mhoogveld closed this Sep 14, 2020
@mhoogveld mhoogveld reopened this Sep 14, 2020
@mjpt777 mjpt777 merged commit 7f00e1f into aeron-io:master Sep 15, 2020
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.

3 participants