-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Discussion: Clarify contributor guidelines #9994
Comments
From my perspective, I believe that @h3xds1nz's contributions are extremely valuable and deserve recognition and encouragement. Although some changes can be extensive at times, as long as they are deemed correct or can be aligned with everyone’s expectations after code review, I think it is not an issue. The only current problem is our inability to promptly process @h3xds1nz's PRs, which has caused me to worry about potential conflicts with my own changes to certain modules. However, this is a minor issue that can be resolved with a bit more caution and patience on my part. |
I believe I commented on several occasions to this, so to summarize my views: I prefer matching surrounding code style and doing minimal changes to make PRs easy to review. Using new types and language features is fine by me, renaming members should be justified. I recognize that some people prefer enforcing consistent formatting and I wouldn't oppose introducing this in the WPF repo. @lindexi too many PRs can be solved by queuing batch of PRs together for a test pass. If there is a good track of these passing, we could become optimistic and increase the batch size (personally I would probably give it a go and try all at once). |
Thanks @ThomasGoulet73 for creating this.
Those commits then can be ignored in I'd even drive this myself if there's an agreement between the community and the team; but I'd hate to see those changes done with a lot of PRs open from all community members because it will then surely lead to merge conflicts on all fronts; and that can lead to errors in the actual submitted PRs, sometimes you just overlook stuff you've previously tested because you've resolved something in a different manner. There were after all already some changes done in large scale; e.g. string interpolation, usage of throw helpers, SR props instead of constants etc. @lindexi If you do not resolve merge conflicts caused by your own changes at least 3 times, I do not know what are you doing! 😆 |
@ThomasGoulet73 - Thank you for opening this issue. From WPF side, I agree that we need to update our Updating (It'd be easier to update these style fixes (in-line with other .NET repos) in assembly-wise fashion (similar to @ThomasGoulet73 SR changes) Community suggestions/contributions on this space are welcomed) Given our performance prioritization, we are okay with ingesting micro-optimizations as it would help keeping the codebase up to date with newer/more performant .NET abstractions. That being said, each of these PRs do undergo full WPF testing to minimize risk of regressions. |
In response to @h3xds1nz here #9981 (comment):
My comment #9981 (comment) was mainly about PRs from external contributors. Jeremy is part of the WinForms team and my suggestion wasn't about Microsoft employees. I personally wouldn't have done #9882 the same way but it's not my place to say. A lot of the WinForms PR you included were specifically about refactoring (And also done by Jeremy, a member of the WinForms team). Maybe I wasn't clear in my comment but I'm in favor of refactoring/formatting-only PRs from external contributors. My point was about not mixing performance enhancement, bug fix or new features with refactoring/formatting unecessary for the PR. Also, the bar for refactoring/formatting changes should be higher for external contributors since IMO it shouldn't be about personal preference, it should be about code that is explicitly against the coding style guideline. Some things of the top of my head that IMO should be accepted as external contributions would be removing unused namespaces.
That might be true but IMO that's an argument towards not doing unrelated changes. If you want to fix the format in a PR not about formatting you'll format a lot more unrelated code in this code base than in other code base where you might change a couple of things.
Personally, I think the code you linked is "fine". I probably wouldn't have written it the same way but I would be comfortable working in it. In the "70 lines" you talk about I believe you would put stuff on a single line instead of multiple lines which IMO would hurt readability. A single line shorter than the recommended max length doesn't mean that it is more readable than being on multiple lines. Less lines != more readable.
Let's say you were opening a PR about changing
I share the same opinion. I tried to answer all your points but let me know if I missed one. TL;DR: |
I don't see how the bar should be different, when working with a community of people, the rules should be same for everyone. But it's not enough to set rules if the codebase sits in the state it currently is. Don't remind me removing unused namespaces, last time when that PR got merged from Jeremy, I had to fix 17 PRs conflicting; if the PR with removing unused namespaces goes through, I'll have to fix most of my PRs which I really don't wanna do. Kind of don't wanna post anymore right now until I know what happens. That's another thing, I've said it in the previous post but I'll say it again, I'd hate to see those changes done with a lot of PRs open from all community members because it will then surely lead to merge conflicts on all fronts; and that can lead to errors in the actual submitted PRs, sometimes you just overlook stuff you've previously tested because you've resolved something in a different manner. And yes, I'm mostly talking about myself with the number of PRs open.
The argument here is that I'm used to press auto format after every line I write, it's something I've learnt years ago when we switched to auto formatting, there's just nothing better than consistency and not having to care about it when it's done automatically. I have to often write the code in a separate project to prevent this "habit" from striking in big files, it is what it is. That's my problem, obviously, but just sharing my experience at this point.
IMO having the whole method at screen size, knowing from what happens from top to bottom is way better than having to scroll 5 times up and down when you're going through the code. I know less lines != more readable, I often e.g. add braces to
The hidden point there is that
A lot of the times it is possible, it just haven't been done yet. With scoping I couldn't agree more but then again, earlier point about conflicts stands. I agree less with perf PRs (again, if there was proper formatting, its less noise to begin with) but I fully agree with bug fixes. All the bugfixes I have open are just the necessary lines when possible since changing (fixing) the behavior is something that should be left without any other changes. |
There was some discussion in #9981 about what kind of changes should be included in a pull-request (The main point discussed in #9981 was about unrelated changes for refactoring/formatting).
I took the liberty of opening this issue to discuss it with the community and the WPF team. Obviously, I think we are free to discuss it but the WPF team will have the final say about this.
The end goal of this issue is to document it properly and for the guidelines to be clear to set the right expectation for a PR.
The text was updated successfully, but these errors were encountered: