You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Christofer Dutz <ch...@c-ware.de> on 2021/03/19 09:55:06 UTC

[DISCUSS] Generate a standalone executable version of the maven-plugin and build tools?

Hi,

last week I managed to do some cool stuff with GraalVM compiling a Java Application into a windows executable.
Now I was thinking ... wouldn't this also work for our Maven plugin? Of course, we probably need to add something to it or to create a new module that uses the template engine and the mspec parser in a standalone application.

So, If we had such an executable, we could probably automate the code generation for C, Go and .Net too and wouldn't have to check-in generated code.

What do you think?


Chris

AW: [DISCUSS] Generate a standalone executable version of the maven-plugin and build tools?

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Otto,

well generally it's considered bad practice to commit generated code.
Especially in this case it mixes up with the real code. 

Yes: It also has the benefit of us being able to review code and I remember we used to use that for this in the early days of PLC4C.

Sebastian made the code generation add a comment to the files so at least the JetBrains IDEs will start yelling at you as soon as you start editing these files.

It was just something that popped my mind and I wanted to hear what you all think about it. 

If we keep doing it the way we currently do it, it's less work for me, so I'm happy with it.

The upside would be, that someone working on PLC4Go exclusively could theoretically update the generated code without requiring Maven ... but I would say it's something we should simply: That's the way it works ... deal with it ;-)

Chris


-----Ursprüngliche Nachricht-----
Von: Otto Fowler <ot...@gmail.com> 
Gesendet: Freitag, 19. März 2021 13:30
An: dev@plc4x.apache.org
Betreff: Re: [DISCUSS] Generate a standalone executable version of the maven-plugin and build tools?

My impression was that we checked in the code so that we could review the code / code generation changes in github, not because of a lack of automation.  I don’t see what this would give us that we don’t have, other than being in a different shiny way.  Can you elaborate more on the problem this would solve?

> On Mar 19, 2021, at 05:55, Christofer Dutz <ch...@c-ware.de> wrote:
> 
> Hi,
> 
> last week I managed to do some cool stuff with GraalVM compiling a Java Application into a windows executable.
> Now I was thinking ... wouldn't this also work for our Maven plugin? Of course, we probably need to add something to it or to create a new module that uses the template engine and the mspec parser in a standalone application.
> 
> So, If we had such an executable, we could probably automate the code generation for C, Go and .Net too and wouldn't have to check-in generated code.
> 
> What do you think?
> 
> 
> Chris


Re: [DISCUSS] Generate a standalone executable version of the maven-plugin and build tools?

Posted by Otto Fowler <ot...@gmail.com>.
“If we do this, then we can remove the requirement on maven for non java implementation projects”.  

+1



> On Mar 19, 2021, at 08:30, Otto Fowler <ot...@gmail.com> wrote:
> 
> My impression was that we checked in the code so that we could review the code / code generation changes in github, not because of a lack of automation.  I don’t see what this would give us that we don’t have, other than being in a different shiny way.  Can you elaborate more on the problem this would solve?
> 
>> On Mar 19, 2021, at 05:55, Christofer Dutz <ch...@c-ware.de> wrote:
>> 
>> Hi,
>> 
>> last week I managed to do some cool stuff with GraalVM compiling a Java Application into a windows executable.
>> Now I was thinking ... wouldn't this also work for our Maven plugin? Of course, we probably need to add something to it or to create a new module that uses the template engine and the mspec parser in a standalone application.
>> 
>> So, If we had such an executable, we could probably automate the code generation for C, Go and .Net too and wouldn't have to check-in generated code.
>> 
>> What do you think?
>> 
>> 
>> Chris
> 


Re: [DISCUSS] Generate a standalone executable version of the maven-plugin and build tools?

Posted by Otto Fowler <ot...@gmail.com>.
My impression was that we checked in the code so that we could review the code / code generation changes in github, not because of a lack of automation.  I don’t see what this would give us that we don’t have, other than being in a different shiny way.  Can you elaborate more on the problem this would solve?

> On Mar 19, 2021, at 05:55, Christofer Dutz <ch...@c-ware.de> wrote:
> 
> Hi,
> 
> last week I managed to do some cool stuff with GraalVM compiling a Java Application into a windows executable.
> Now I was thinking ... wouldn't this also work for our Maven plugin? Of course, we probably need to add something to it or to create a new module that uses the template engine and the mspec parser in a standalone application.
> 
> So, If we had such an executable, we could probably automate the code generation for C, Go and .Net too and wouldn't have to check-in generated code.
> 
> What do you think?
> 
> 
> Chris