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

Fix guides code generation to be consistent with content #14453

Merged
merged 1 commit into from
Jan 26, 2021

Conversation

ia3andy
Copy link
Contributor

@ia3andy ia3andy commented Jan 20, 2021

Added resteasy or spring-web everywhere when the create command is using -Dpath to make sure the generated code is consistent with the content of the guide.

Added -DnoExamples when the command was not using -Dpath (it wasn't generating any code in the legacy codegen)

This also @deprecate devtools/maven/src/main/java/io/quarkus/maven/CreateProjectMojo#path and improves the description for className.

Also, in a quick glimpse, I think some of the -DnoExample could be removed to at least create the endpoint for the tuto.

Until we have #12957 the generated code may contain more class than expected (if some of the extensions have codestarts)

Related to #14391
Fixes #13917

cc @maxandersen @rsvoboda @gsmet

@ghost ghost added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation area/maven labels Jan 20, 2021
@ia3andy ia3andy requested review from maxandersen and gsmet January 21, 2021 08:02
@ia3andy
Copy link
Contributor Author

ia3andy commented Jan 21, 2021

It would be good to review/merge that one as most of the guides are broken right now!

@ia3andy
Copy link
Contributor Author

ia3andy commented Jan 22, 2021

ping @maxandersen

@ia3andy
Copy link
Contributor Author

ia3andy commented Jan 25, 2021

ping pong ping pong :) @maxandersen @gsmet

Copy link
Member

@maxandersen maxandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the ones that did not add resteasy and just used noexamples and spotted a few that relied on resteasy or jaxrs.

curious on what made noExmaples=true be a good choice for those or I missed some magic :)

@maxandersen maxandersen self-requested a review January 25, 2021 11:24
Copy link
Member

@maxandersen maxandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clicked the wrong button - requesting changes.

@ia3andy
Copy link
Contributor Author

ia3andy commented Jan 25, 2021

@maxandersen guides without path were not generating any example code in the legacy, I've added noExamples to keep the same behavior.. It is not related to resteasy being used or not.

I guess some guides were already broken and maybe we should ping the maintainers because this is not the role of this PR IMO

@ia3andy ia3andy force-pushed the fix-guides branch 2 times, most recently from b029d11 to 1a0b891 Compare January 25, 2021 17:13
@ia3andy
Copy link
Contributor Author

ia3andy commented Jan 25, 2021

Hey @maxandersen I tried to add -Dpath everywhere you said reasteasy was needed when possible. Could you give another pass to the remaining -DnoExamples?

Also while doing I didn't manage to fix 'security-openid-connect-web-authentication' because the guide was not consistent with the quickstart (#14587)

@gsmet
Copy link
Member

gsmet commented Jan 25, 2021

Makes sense to me. We really need to get this into 1.11.1.Final.

@gsmet
Copy link
Member

gsmet commented Jan 25, 2021

We also had several reports of a version mismatch: #14589 .

The apps are now generated with a version 1.0.0-SNAPSHOT instead of the previous 1.0-SNAPSHOT. which can create issues in the guides... and we would also need to make all the quickstarts consistent.

@ia3andy
Copy link
Contributor Author

ia3andy commented Jan 26, 2021

ok, thanks for the heads up on the version @gsmet, you are right, I haven't thought about the generated runner (and the guides) when changing the default version 😔 (it was to be consistent with code.quarkus.io), even if I preferred 1.0.0-SNAPSHOT, maybe I should have gone the other way around.

@gsmet
Copy link
Member

gsmet commented Jan 26, 2021

Well, I don't know in which direction we want to go but we need a fix one way or the other :).

Basically:

  • either you change the default version in the codestarts code and we revert the 2 small PRs that got in
  • or you fix all the guides and all the quickstarts with the new version

The second option will obviously be more tedious.

@gsmet
Copy link
Member

gsmet commented Jan 26, 2021

Note: I release 1.11.1.Final tomorrow morning.

@ia3andy
Copy link
Contributor Author

ia3andy commented Jan 26, 2021

@maxandersen you need to get on that one if we don't want to be late!

@ia3andy
Copy link
Contributor Author

ia3andy commented Jan 26, 2021

Well, I don't know in which direction we want to go but we need a fix one way or the other :).

Basically:

  • either you change the default version in the codestarts code and we revert the 2 small PRs that got in
  • or you fix all the guides and all the quickstarts with the new version

The second option will obviously be more tedious.

@gsmet could you give me the commit ids please? I will create a PR to go back to 1.0-SNAPSHOT (I'll live with it :) )

@maxandersen
Copy link
Member

oh so thats where the 1.0-SNAPSHOT debacle is coming from ? I wonder why we would have 1.0-SNAPSHOT anywhere...turned out our docs says so..damn.

Copy link
Member

@maxandersen maxandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good - LGTM for fixing the lack of resteasy :)

the version nuber stuff i'm surprised why changing from 1.0 to 1.0.0 breaks things...but that could be seperate PR to handle.

@ia3andy ia3andy merged commit 2ef2f43 into quarkusio:master Jan 26, 2021
@ghost ghost added this to the 1.12 - master milestone Jan 26, 2021
@ia3andy ia3andy deleted the fix-guides branch January 26, 2021 12:19
@maxandersen
Copy link
Member

I found #14589

if thats the delta then a PR after this one with a 1.0-SNAPSHOT replaced with 1.0.0-SNAPSHOT seems the way forward.

@ia3andy
Copy link
Contributor Author

ia3andy commented Jan 26, 2021

We would also need to update the version in the quickstarts then, but I guess it's alright..

@gsmet
Copy link
Member

gsmet commented Jan 27, 2021

@ia3andy @maxandersen

So as I said, two options:

This needs to be done before the 1.11 release we will ship in RHBQ so merged before February 8th evening.

I don't really care about the option chosen but we need it fixed sooner rather than later.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation area/maven
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix the guides which use className when generating the project
3 participants