Skip to content
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

Enable proper maintainable code generation #8178

Closed
3 tasks
maxandersen opened this issue Mar 26, 2020 · 1 comment
Closed
3 tasks

Enable proper maintainable code generation #8178

maxandersen opened this issue Mar 26, 2020 · 1 comment
Assignees
Labels
kind/enhancement New feature or request

Comments

@maxandersen
Copy link
Member

Describe the bug
This is not news, but couldn't find an issue representing it so writing this down here and we can link it up if need be.

In 1.3.1 we are trying to switch code generation to generate for java 11 instead of java 8 based on what version of java the user is running.

That revealed a few things;

  1. it breaks former 1.3.x plugins as now the templates introduces a new variable that 1.3.0 wont set.

  2. to fix Switch to the Maven distributed copy of the SubstrateVM annotations #1 it was suggested to use freemarker default value fallbacks so if the variable is not set a reasonable default is generated - problem is at some point the code generation stopped using freemarker (but still called the files .ftl) and now its all done by string replacement making it impossible to have the codegeneration templates have fallbacks to stay compatible.

  3. assumed reason for stopping to use freemarker was to let code.quarkus run in native mode; that was probably not a good idea to do before we actually had something like that qute that can run in native mode. otherwise we are stuck with either not progressing the templates in minor releases or breaking users using project create since the default behavior is to pick the latest released platform.

outcome of this is two-fold I would say:

  • consider removing the behavior where we pick up the latest released platform (at least until this issue is fixed)
  • consider having a separate file (available online, maybe via maven) to outline what version of platform we should pickup instead of making it "always the latest-greatest" (done in past effectively for jbosstools config.properties code is here.
  • consider using qute to make generation feasible in native for code.quarks (I dont think it can be in long run if we need it to target multiple versions) but at least have some proper template language that can handle fallback defaults.
@maxandersen maxandersen added kind/bug Something isn't working kind/enhancement New feature or request and removed kind/bug Something isn't working labels Mar 26, 2020
@ia3andy ia3andy self-assigned this Apr 28, 2020
ia3andy added a commit to ia3andy/quarkus that referenced this issue May 26, 2020
This is part of quarkusio#8178

The result is just a tiny bit better, this is just a step in my journey. Having more consistency and readability will help in the refactoring process..

- Use only the values in `QuarkusCommandInvocation`, because having the Properties and the Values made it confusing
- Make `QuarkusCommandInvocation` more consistent by making it partially immutable (only values are mutable) and enforcing non null params in the constructor
- Remove legacy @deprecated stuff
ia3andy added a commit to ia3andy/quarkus that referenced this issue May 27, 2020
…Tool coupling

This is part of quarkusio#8178

This is a good one :-), things starts to get nicer and cleaner (but not quite there yet ^^)..
ia3andy added a commit to ia3andy/quarkus that referenced this issue May 27, 2020
…Tool coupling

This is part of quarkusio#8178

This is a good one :-), things starts to get nicer and cleaner (but not quite there yet ^^)..
ia3andy added a commit to ia3andy/quarkus that referenced this issue May 28, 2020
…Tool coupling

This is part of quarkusio#8178

This is a good one :-), things starts to get nicer and cleaner (but not quite there yet ^^)..
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jun 4, 2020
This is part of quarkusio#8178

- Improved packages names and content
- Improved general readability and consistency
- Added ExtensionManager to define a high level way of managing (read/write) extensions in any QuarkusProject
- Removed most unsafe Gradle operations which were outside of the Gradle plugin (we need to figure out a way to improve the "generic" gradle support to make it compatible again..)
- Removed existing project support with the create command (throws an error)
- Removed compatibility with project without the Quarkus platform bom defined
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jun 4, 2020
This is part of quarkusio#8178

- Improved packages names and content
- Improved general readability and consistency
- Added ExtensionManager to define a high level way of managing (read/write) extensions in any QuarkusProject
- Removed most unsafe Gradle operations which were outside of the Gradle plugin (we need to figure out a way to improve the "generic" gradle support to make it compatible again..)
- Removed existing project support with the create command (throws an error)
- Removed compatibility with project without the Quarkus platform bom defined
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jun 4, 2020
This is part of quarkusio#8178

- Improved packages names and content
- Improved general readability and consistency
- Added ExtensionManager to define a high level way of managing (read/write) extensions in any QuarkusProject
- Removed most unsafe Gradle operations which were outside of the Gradle plugin (we need to figure out a way to improve the "generic" gradle support to make it compatible again..)
- Removed existing project support with the create command (throws an error)
- Removed compatibility with project without the Quarkus platform bom defined
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jun 4, 2020
This is part of quarkusio#8178

- Improved general readability and consistency
- Added ExtensionManager to define a high level way of managing (read/write) extensions in any QuarkusProject
- Removed most unsafe Gradle operations which were outside of the Gradle plugin (we need to figure out a way to improve the "generic" gradle support to make it compatible again..)
- Removed existing project support with the create command (throws an error)
- Removed compatibility with project without the Quarkus platform bom defined
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jun 4, 2020
This is part of quarkusio#8178

- Improved general readability and consistency
- Added ExtensionManager to define a high level way of managing (read/write) extensions in any QuarkusProject
- Removed most unsafe Gradle operations which were outside of the Gradle plugin (we need to figure out a way to improve the "generic" gradle support to make it compatible again..)
- Removed existing project support with the create command (throws an error)
- Removed compatibility with project without the Quarkus platform bom defined
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jun 8, 2020
This is part of quarkusio#8178

- Improved general readability and consistency
- Added ExtensionManager to define a high level way of managing (read/write) extensions in any QuarkusProject
- Removed most unsafe Gradle operations which were outside of the Gradle plugin (we need to figure out a way to improve the "generic" gradle support to make it compatible again..)
- Removed existing project support with the create command (throws an error)
- Removed compatibility with project without the Quarkus platform bom defined
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jun 9, 2020
This is part of quarkusio#8178

- Improved general readability and consistency
- Added ExtensionManager to define a high level way of managing (read/write) extensions in any QuarkusProject
- Removed most unsafe Gradle operations which were outside of the Gradle plugin (we need to figure out a way to improve the "generic" gradle support to make it compatible again..)
- Removed existing project support with the create command (throws an error)
- Removed compatibility with project without the Quarkus platform bom defined
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jun 9, 2020
This is part of quarkusio#8178

- Improved general readability and consistency
- Added ExtensionManager to define a high level way of managing (read/write) extensions in any QuarkusProject
- Removed most unsafe Gradle operations which were outside of the Gradle plugin (we need to figure out a way to improve the "generic" gradle support to make it compatible again..)
- Removed existing project support with the create command (throws an error)
- Removed compatibility with project without the Quarkus platform bom defined
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jun 9, 2020
This is part of quarkusio#8178

- Improved packages names and content
- Improved general readability and consistency
- Added ExtensionManager to define a high level way of managing (read/write) extensions in any QuarkusProject
- Removed most unsafe Gradle operations which were outside of the Gradle plugin (we need to figure out a way to improve the "generic" gradle support to make it compatible again..)
- Removed existing project support with the create command (throws an error) -> quarkusio#9875
- Removed compatibility with project without the Quarkus platform bom defined
- Remove SetupIT which mostly duplicate CreateProjectMojoIT
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jun 9, 2020
This is part of quarkusio#8178

- Improved packages names and content
- Improved general readability and consistency
- Added ExtensionManager to define a high level way of managing (read/write) extensions in any QuarkusProject
- Removed most unsafe Gradle operations which were outside of the Gradle plugin (we need to figure out a way to improve the "generic" gradle support to make it compatible again..)
- Removed existing project support with the create command (throws an error) -> quarkusio#9875
- Removed compatibility with project without the Quarkus platform bom defined
- Remove SetupIT which mostly duplicate CreateProjectMojoIT
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jun 10, 2020
This is part of quarkusio#8178

- Improved packages names and content
- Improved general readability and consistency
- Added ExtensionManager to define a high level way of managing (read/write) extensions in any QuarkusProject
- Removed most unsafe Gradle operations which were outside of the Gradle plugin (we need to figure out a way to improve the "generic" gradle support to make it compatible again..)
- Removed existing project support with the create command (throws an error) -> quarkusio#9875
- Removed compatibility with project without the Quarkus platform bom defined
- Remove SetupIT which mostly duplicate CreateProjectMojoIT
johnaohara pushed a commit to johnaohara/quarkus that referenced this issue Jun 29, 2020
This is part of quarkusio#8178

The result is just a tiny bit better, this is just a step in my journey. Having more consistency and readability will help in the refactoring process..

- Use only the values in `QuarkusCommandInvocation`, because having the Properties and the Values made it confusing
- Make `QuarkusCommandInvocation` more consistent by making it partially immutable (only values are mutable) and enforcing non null params in the constructor
- Remove legacy @deprecated stuff
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 21, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 22, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 22, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 24, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 28, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 28, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 28, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 28, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 28, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 28, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 28, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 29, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 29, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 30, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 30, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 30, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 30, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 30, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 30, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 30, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 30, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 30, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 30, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 30, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 31, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 31, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
ia3andy added a commit to ia3andy/quarkus that referenced this issue Jul 31, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jul 31, 2020
Part of quarkusio#8134 and quarkusio#8178

Copying a few lines of code from `ClassPathUtils.processAsPath`

Various tidy ups

Add qute-example codestart and change naming convention

Improve integration tests

Use descriptive processors for codestarts
@ia3andy
Copy link
Contributor

ia3andy commented Oct 15, 2021

This is done

@ia3andy ia3andy closed this as completed Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants