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

chore(cli): Java init template compiles apps before trying to run them #8850

Merged
merged 8 commits into from Jul 9, 2020
Merged

chore(cli): Java init template compiles apps before trying to run them #8850

merged 8 commits into from Jul 9, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jul 2, 2020

The TypeScript and C# init templates use commands that compile the code before running it to prevent the user from forgetting. This adds the same functionality to the Java init template.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jul 2, 2020
@ghost ghost requested review from NGL321 and RomainMuller July 3, 2020 02:54
@ghost
Copy link
Author

ghost commented Jul 7, 2020

@RomainMuller Can you approve this, assuming I've done it the best way? I'd like to get it into a release soon; it'll let me remove lots of build instructions from the Dev Guide.

Copy link
Contributor

@RomainMuller RomainMuller left a comment

Choose a reason for hiding this comment

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

I reckon this can be achieved without shelling out twice (tested locally and achieved the expected result).

packages/aws-cdk/lib/init-templates/app/java/cdk.json Outdated Show resolved Hide resolved
@RomainMuller
Copy link
Contributor

I'd like to get it into a release soon; it'll let me remove lots of build instructions from the Dev Guide.

Yeah that definitely is a sweet, sweet simplification! Thanks for looking into that!!

@RomainMuller RomainMuller self-assigned this Jul 7, 2020
@RomainMuller RomainMuller added the package/tools Related to AWS CDK Tools or CLI label Jul 7, 2020
@ghost
Copy link
Author

ghost commented Jul 7, 2020

@RomainMuller Ready for another look.

@ghost ghost requested a review from RomainMuller July 7, 2020 14:35
@ghost
Copy link
Author

ghost commented Jul 8, 2020

I reckon this can be achieved without shelling out twice (tested locally and achieved the expected result).

I thought about trying it in one command but was afraid it might still try to run the app if the compile failed. On reflection, even it did that, you're just going to get the same result you already had, so no harm. And avoiding spinning up the JVM twice seems like a definite win.

@shivlaks
Copy link
Contributor

shivlaks commented Jul 9, 2020

@jerry-aws nice! this is a great simplification.

were you able to run the integ tests successfully as well? yarn integ-init or npm run integ-init
since our PR build doesn't run these, might be worth running it for sanity ahead of the merge.

@RomainMuller RomainMuller added the pr/do-not-merge This PR should not be merged at this time. label Jul 9, 2020
@RomainMuller
Copy link
Contributor

Annotated with do-not-merge so you can consider @shivlaks' comment. You can remove the label when you're ready to merge in.

@ghost ghost removed the pr/do-not-merge This PR should not be merged at this time. label Jul 9, 2020
@mergify
Copy link
Contributor

mergify bot commented Jul 9, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@ghost
Copy link
Author

ghost commented Jul 9, 2020

I was able to run the integ tests successfully after a bit of effort.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: a9c08b8
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Jul 9, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit c1f393f into aws:master Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants