Skip to content

Comments

(2.0) Generate managers and POMs for Azure SDK for Java#2467

Closed
RikkiGibson wants to merge 36 commits intoAzure:2.0from
RikkiGibson:azure-gen-manager-2
Closed

(2.0) Generate managers and POMs for Azure SDK for Java#2467
RikkiGibson wants to merge 36 commits intoAzure:2.0from
RikkiGibson:azure-gen-manager-2

Conversation

@RikkiGibson
Copy link
Member

This is a repeat of #2446, but based on the 2.0 branch instead of master.

Adds some templates to generate stub Manager classes. The generation of the Manager and POM is controlled by the RegenerateManager flag. Note that the path provided to Autorest in the Azure SDK for Java project has changed so that we can reasonably write the POM to the correct location.

The ServiceName property is something that we just expect to work most of the time due to the convention for paths in Azure, as well as the fact that we expect each service we generate code for to have at least one method.

@RikkiGibson RikkiGibson requested a review from jianghaolu July 21, 2017 21:47
@msftclas
Copy link

@RikkiGibson,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@RikkiGibson
Copy link
Member Author

@olydis any idea why CI is failing here? Looks like it's failing similarly on Azure/2.0 branch.

@RikkiGibson RikkiGibson requested a review from olydis July 24, 2017 18:34
@olydis
Copy link
Contributor

olydis commented Jul 25, 2017

@RikkiGibson Making Travis work is WIP, Jenkins however discovered changes in generated *.java files. Please run gulp regenerate. This check is in place to prevent accidental changes to generated code - PRs are essentially forced to also contain some samples of (diffs to) generated code so they can be checked for sanity.

@RikkiGibson
Copy link
Member Author

Got it. That makes a lot of sense. I'll be augmenting this PR to add generated managers and project files for .NET and then committing the regenerated samples for everything.

# Conflicts:
#	Samples/1c-multiple-input-swaggers/shell/stdout.txt
#	Samples/1d-common-settings/shell/stdout.txt
#	Samples/2a-validation/shell/stdout.txt
#	Samples/3a-literate-swagger/shell/stdout.txt
#	Samples/3b-custom-transformations/shell/stdout.txt
#	Samples/3c-guards/shell/stdout.txt
#	Samples/3d-custom-validation/shell/stdout.txt
#	Samples/3e-batch-mode/shell/stdout.txt
#	Samples/test/end-to-end/network/shell/stdout.txt
#	Samples/test/error-behavior/openapi-json-bad-syntax/shell/stderr.txt
#	Samples/test/error-behavior/openapi-md-bad-syntax/shell/stdout.txt
#	Samples/test/error-behavior/openapi-yaml-bad-file-reference/shell/stdout.txt
#	Samples/test/error-behavior/openapi-yaml-bad-reference/shell/stderr.txt
#	Samples/test/error-behavior/openapi-yaml-bad-reference/shell/stdout.txt
#	Samples/test/error-behavior/openapi-yaml-bad-syntax/shell/stderr.txt
#	Samples/test/error-behavior/openapi-yaml-bad-type/shell/stderr.txt
#	Samples/test/error-behavior/openapi-yaml-bad-type/shell/stdout.txt
#	Samples/test/error-behavior/openapi-yaml-good/shell/stdout.txt
#	Samples/test/hidden-methods/shell/stdout.txt
#	Samples/test/shared-response-header-types/shell/stdout.txt
#	Samples/test/stream-with-content-type/ClientCSharp/Models/ImageType.cs
@RikkiGibson RikkiGibson force-pushed the azure-gen-manager-2 branch 2 times, most recently from d6af0e0 to df69d7d Compare August 18, 2017 22:08
# Conflicts:
#	Samples/2b-suppressions/shell/stdout.txt
#	Samples/3a-literate-swagger/shell/stderr.txt
#	Samples/3d-custom-validation/shell/stderr.txt
#	Samples/test/error-behavior/config-bad-syntax/shell/stderr.txt
#	Samples/test/error-behavior/config-bad-syntax/shell/stdout.txt
#	Samples/test/error-behavior/openapi-json-bad-syntax/shell/stdout.txt
#	Samples/test/error-behavior/openapi-json-good/shell/stdout.txt
#	Samples/test/error-behavior/openapi-md-bad-fence/shell/stdout.txt
#	Samples/test/error-behavior/openapi-md-bad-syntax/shell/stderr.txt
#	Samples/test/error-behavior/openapi-md-good/shell/stdout.txt
#	Samples/test/error-behavior/openapi-yaml-bad-file-reference/shell/stderr.txt
#	Samples/test/error-behavior/openapi-yaml-bad-syntax/shell/stdout.txt
@RikkiGibson
Copy link
Member Author

@olydis I've merged in the latest from 2.0 and run gulp regenerate. Does anything about the diff of gulp regenerate (last commit in the PR) seem amiss?

@olydis
Copy link
Contributor

olydis commented Aug 24, 2017

@RikkiGibson yes, this seems weird, but don't worry about regeneration at this point! Once the repo's are split (working on Java as we speak), everything will make way more sense.

@RikkiGibson
Copy link
Member Author

I'm seeing this error from the Jenkins build:

17:28:01   FATAL: System.IO.IOException: File not found: src/main/java/fixtures/azurereport/implementation/AutoRestReportServiceForAzureImpl.java

Is there anything blocking this from being merged? Anything I can do?

@olydis
Copy link
Contributor

olydis commented Aug 25, 2017

Huh, this was not the case before so I assume it is related to this PR. At this point it's probably best to reopen cleanly against https://github.com/Azure/autorest.java (will have that repo populated tomorrow!), note that your PR also changes generated cs files that should really not have been affected by the changes you made, looks to me as if the other languages' generators weren't the most recent ones (or not compiled) when you did gulp regenerate. This kind of stuff (always having to pull latest changes for everything - we have 8 languages now) is annoying pretty much everyone working on AutoRest, which is exactly why stuff is split now. I'm essentially done, just some testing and automation scripts. I'll gladly help retargeting your PR against the new repo - could be it'll immediately pass CI (that only does Java stuff, yay!) there 😉

@RikkiGibson
Copy link
Member Author

Sounds excellent. I'll follow up on that early next week.

@olydis
Copy link
Contributor

olydis commented Aug 29, 2017

replayed Java parts of this at Azure/autorest.java#2
replayed C# parts of this at Azure/autorest.csharp#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants