You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Otavio Rodolfo Piske <an...@gmail.com> on 2022/04/26 09:02:20 UTC

HEADS-UP: maven profile changes

Hello,

Just as a heads up, as part of the work on CAMEL-17894, there was a change
in the plugins running by default on our build.

Previously, the code would run the import sorting + code formatting by
default. This behavior was now moved to the "format" profile. As such, to
both format and run the fastinstall, you should use:
"mvn -Pformat,fastinstall".

Please, reach out if you find any problems with the above behavior.

Kind regards
-- 
Otavio R. Piske
http://orpiske.net

Re: HEADS-UP: maven profile changes

Posted by Jeremy Ross <je...@gmail.com>.
Obviously it's best to not let improperly formatted code into the repo to
begin with, but we can give this a try and see how it works out in practice.



On Sun, May 1, 2022 at 1:35 PM Otavio Rodolfo Piske <an...@gmail.com>
wrote:

> Hello Jeremy,
>
> I agree with you that moving to a manual check of the format can lead to
> more non-compliant code.
>
> To reduce this risk, I have reworked a Gtihub action that we had before, so
> that it automatically checks for code formatting violations [1]. If any
> formatting violation is found, then it sends a PR with the changes [2].
> Currently this is being done for every push to main. I am keeping an eye on
> it to ensure it doesn't flood us with PRs (there was an initial burst of
> PRs on the first day, but it seems to have settled so far).
>
> What do you think about this approach?
>
> 1.
>
> https://github.com/apache/camel/blob/main/.github/workflows/main-push-build.yml
> 2. (Here's an example): https://github.com/apache/camel/pull/7534
>
> Kind regards
>
> On Sat, Apr 30, 2022 at 10:12 PM Jeremy Ross <je...@gmail.com>
> wrote:
>
> > I suspect that sorting/formatting by default was fairly effective at
> > keeping the codebase compliant with standards. If a certain maven profile
> > is required to format and/or sourcecheck, it seems that we'll end up with
> > more non-compliant code.
> >
> > I know we're trying to speed up build times, so is there some other way
> we
> > can check formatting? Commit hooks, etc.?
> >
> > On Tue, Apr 26, 2022 at 4:02 AM Otavio Rodolfo Piske <
> angusyoung@gmail.com
> > >
> > wrote:
> >
> > > Hello,
> > >
> > > Just as a heads up, as part of the work on CAMEL-17894, there was a
> > change
> > > in the plugins running by default on our build.
> > >
> > > Previously, the code would run the import sorting + code formatting by
> > > default. This behavior was now moved to the "format" profile. As such,
> to
> > > both format and run the fastinstall, you should use:
> > > "mvn -Pformat,fastinstall".
> > >
> > > Please, reach out if you find any problems with the above behavior.
> > >
> > > Kind regards
> > > --
> > > Otavio R. Piske
> > > http://orpiske.net
> > >
> >
>
>
> --
> Otavio R. Piske
> http://orpiske.net
>

Re: HEADS-UP: maven profile changes

Posted by Otavio Rodolfo Piske <an...@gmail.com>.
Hello Jeremy,

I agree with you that moving to a manual check of the format can lead to
more non-compliant code.

To reduce this risk, I have reworked a Gtihub action that we had before, so
that it automatically checks for code formatting violations [1]. If any
formatting violation is found, then it sends a PR with the changes [2].
Currently this is being done for every push to main. I am keeping an eye on
it to ensure it doesn't flood us with PRs (there was an initial burst of
PRs on the first day, but it seems to have settled so far).

What do you think about this approach?

1.
https://github.com/apache/camel/blob/main/.github/workflows/main-push-build.yml
2. (Here's an example): https://github.com/apache/camel/pull/7534

Kind regards

On Sat, Apr 30, 2022 at 10:12 PM Jeremy Ross <je...@gmail.com>
wrote:

> I suspect that sorting/formatting by default was fairly effective at
> keeping the codebase compliant with standards. If a certain maven profile
> is required to format and/or sourcecheck, it seems that we'll end up with
> more non-compliant code.
>
> I know we're trying to speed up build times, so is there some other way we
> can check formatting? Commit hooks, etc.?
>
> On Tue, Apr 26, 2022 at 4:02 AM Otavio Rodolfo Piske <angusyoung@gmail.com
> >
> wrote:
>
> > Hello,
> >
> > Just as a heads up, as part of the work on CAMEL-17894, there was a
> change
> > in the plugins running by default on our build.
> >
> > Previously, the code would run the import sorting + code formatting by
> > default. This behavior was now moved to the "format" profile. As such, to
> > both format and run the fastinstall, you should use:
> > "mvn -Pformat,fastinstall".
> >
> > Please, reach out if you find any problems with the above behavior.
> >
> > Kind regards
> > --
> > Otavio R. Piske
> > http://orpiske.net
> >
>


-- 
Otavio R. Piske
http://orpiske.net

Re: HEADS-UP: maven profile changes

Posted by Jeremy Ross <je...@gmail.com>.
I suspect that sorting/formatting by default was fairly effective at
keeping the codebase compliant with standards. If a certain maven profile
is required to format and/or sourcecheck, it seems that we'll end up with
more non-compliant code.

I know we're trying to speed up build times, so is there some other way we
can check formatting? Commit hooks, etc.?

On Tue, Apr 26, 2022 at 4:02 AM Otavio Rodolfo Piske <an...@gmail.com>
wrote:

> Hello,
>
> Just as a heads up, as part of the work on CAMEL-17894, there was a change
> in the plugins running by default on our build.
>
> Previously, the code would run the import sorting + code formatting by
> default. This behavior was now moved to the "format" profile. As such, to
> both format and run the fastinstall, you should use:
> "mvn -Pformat,fastinstall".
>
> Please, reach out if you find any problems with the above behavior.
>
> Kind regards
> --
> Otavio R. Piske
> http://orpiske.net
>