-
Notifications
You must be signed in to change notification settings - Fork 303
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
Introduce IncludeSharedGuardSource property #1430
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1430 +/- ##
==========================================
- Coverage 73.91% 72.92% -0.99%
==========================================
Files 267 262 -5
Lines 9615 9682 +67
==========================================
- Hits 7107 7061 -46
- Misses 2508 2621 +113
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -54,6 +54,10 @@ | |||
<PackageReference Include="StyleCop.Analyzers" Version="$(StyleCopAnalyzersPkgVer)" Condition="'$(SkipAnalysis)'!='true'" PrivateAssets="All" /> | |||
</ItemGroup> | |||
|
|||
<ItemGroup Condition="'$(IncludeSharedGuardSource)'=='true'"> | |||
<Compile Include="$(RepoRoot)\src\Shared\Guard.cs" Link="Includes\Guard.cs" /> |
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.
I don't see much value in extracting this into a variable. It's a single compile include item. I think extracting it into a variable is adding another layer of indirection to figure out what the project needs.
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.
Seems like most project use it what if we made it included by default and only opted-out where a project didn't want to use it?
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.
My only issue with that would be that anytime someone contributes a new project to repo they would now have to be aware of this. We would probably have to update Contributing,md file for new contributors to look out for these "magically" added file(s).
I wouldn't want to surprise them 😄
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.
IMO we are in the worst place right now.
One part of the shared files is included by properties, the other part by direct Compile
calls.
We should move all projects in one direction. When we have agreement, I am fine to extend contribution guide :) .
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.
IMO we are in the worst place right now.
One part of the shared files is included by properties, the other part by direct Compile calls.
I see value in extracting multiple Compile includes into a property. There are a bunch of projects that use a common set of Compile includes. But extracting a single compile include into a property doesn't make sense to me. If that's what we want to do then, where do we stop? Why don't we create a property for every single PackageReference and ProjectReference as well?
We should move all projects in one direction. When we have agreement, I am fine to extend contribution guide :) .
If we want to be consistent, I would be in favor of removing these properties altogether and have each project explicitly add the individual Compile Include they need.
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Changes
Introduce
IncludeSharedGuardSource
property to define source file only once.For significant contributions please make sure you have completed the following items:
[ ] AppropriateCHANGELOG.md
updated for non-trivial changes[ ] Design discussion issue #[ ] Changes in public API reviewed