Formatting on Windows

Julian Waters tanksherman27 at gmail.com
Sat Jul 29 14:13:06 UTC 2023


Hi Thomas and David,

No worries, no discouragement taken. I don't mind the criticism, my
only worry is that I haven't angered any reviewers recently these past few
days. I actually started the efforts on behalf of the MSYS2 project (which
primarily uses the gcc compiler and is in desperate need and want of a
working JDK), so I'll put a break to the changes I've been making lately
and let them decide on what to do going forward. I'll admit I've not been
happy with how my changes have declined from high quality ones to being
hard to review either, so hopefully I can return to properly helping out
soon. Till then, thanks for the advice to both

best regards,
Julian

On Sat, Jul 29, 2023 at 9:43 PM Thomas Stüfe <thomas.stuefe at gmail.com>
wrote:

>
>
> On Sat, Jul 29, 2023 at 2:45 PM David Holmes <david.holmes at oracle.com>
> wrote:
>
>> Hi Julian,
>>
>> On 29/07/2023 3:06 pm, Julian Waters wrote:
>> > As discussed in https://github.com/openjdk/jdk/pull/15063
>> > <https://github.com/openjdk/jdk/pull/15063>, how many of these are
>> > formatting errors worth fixing, and how should they be fixed if they
>> > have to be? gcc has flagged all of them as formatting errors, and while
>> > I could simply silence the checker in compilerWarnings_gcc.hpp on
>> > Windows, I'm unsure if that's the right course of action to take
>>
>> Where was it determined that building for Windows using gcc was a goal
>> of OpenJDK? This is (as Thomas tried to point out) effectively another
>> port, so who is testing and supporting it? I can understand it is an
>> interesting side project for you, but we all end up with the burden of
>> having to deal with this - first by reviewing these PR's and then by
>> dealing with future breakage. AFAIK no one delivering OpenJDK is using
>> gcc for a Windows build. You can't expect everyone to check whether a
>> change that is fine with VS on Windows is also fine with gcc, so this
>> will be forever breaking with ensuing PRs (that others have to expend
>> effort reviewing) to fix it again.
>>
>> Sorry to dampen your enthusiasm on contributing here but there has to be
>> a strong reason to make these kinds of changes. Who wants/needs this?
>>
>>
> Adding my 5 cents to this:
>
> While I understand the theoretical allure of being able to use gcc on
> Windows, I am very skeptical of the practical relevance.
>
> I have worked on weird Operating Systems with odd C++ toolchains. My
> experience is that you never want to base an important infrastructure
> project like OpenJDK on a niche Compiler. This we call the "Little Red
> Riding Hood Path" in German, where you are off the trodden paths, all alone
> by yourself. You will run into many problems nobody else runs into. The
> OpenJDK itself is complex enough without having to deal with an unreliable
> build toolchain.
>
> Therefore, a hypothetical "gcc on Windows" port will cause constant
> maintenance efforts and be a source of fun long after you have written your
> patches. Those are the immediate costs. Add to that the disturbance you
> cause by invasive "shotgun spread" changes. Add to that the cost of
> opportunity: your massive changes have to be reviewed by someone, and that
> someone cannot review something else, possibly more important. Add to that
> the effort of maintaining another build environment, which will never
> replace VS, so it comes atop.
>
> Those are the cost. If there were an entity - a corporation or foundation
> - with engineers on their payroll and a good track record for keeping
> things running, and that entity wanted to sponsor the "gcc on Windows" work
> and shoulder at least the immediate costs, this would be worth considering.
> But I don't see that.
>
> Nor do I see a need. As long as we have a VS toolchain that works well.
> Should MS ever screw that up, the arguments for a gcc port for Windows
> might become more compelling. But even then, it would be worth considering
> alternatives first, e.g. using Intel compilers or other products.
>
> Lastly, I hate discouraging contributors. You are obviously very
> enthusiastic and driven. If you just want to dig your teeth into OpenJDK,
> there are plenty of things you could do. In general, the more focused (few
> lines of code) and useful (fixing actual issues) a patch is, the better.
>
> Cheers, Thomas
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-dev/attachments/20230729/1ddcb879/attachment.htm>


More information about the hotspot-dev mailing list