-
Notifications
You must be signed in to change notification settings - Fork 850
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
More a query really: How big is too big for files in the SDK? #7934
Comments
Thanks for the issue @lawrencegripper !
Hi @jhendrixMSFT do you have more information on this? I hope the track 2 generator can avoid this problem, the |
@ArcturusZhang Thanks for taking a look at this one, that makes lots of sense to me and explains all the repeated blocks. Fingers crossed newer generator can avoid this (tho not sure there is an easy answer to polymorphism in golang). |
Agreed the current implementation for polymorphism is sub-optimal. We have a better design for handling polymorphic types in our track 2 code generator which will eliminate the bulk of this code. It's a pretty significant redesign, so no plans to back-port it to this version as it's a big breaking change. |
If we all agree, I would close this issue in advance. Please feel free to comment or reopen. Thanks! |
Bug Report
Hey this is a bit of a weird one and I'm not sure how to raise and what, if anything, needs to be done. Felt a bit wrong to me so wanted to check.
The
models.go
file for DataFactory is 8mb and around 200k lines long.https://github.com/Azure/azure-sdk-for-go/blob/090dc0ee4d8d2d60e2a9525774d967a4111a2b0c/services/datafactory/mgmt/2018-06-01/datafactory/models.go
I went to the file trying to work out what properties I could use with the model. I couldn't practically find the thing I wanted to look at in such a large file. Granted cloning the repo and using IDE features to navigate to the type I needed got me there so it's not a world ender - more of a shock.
One thing I wanted to check is that this isn't some king bug in the code gen causing the file to bulk out. For example they're are 178 identical
AsAzureTableSource
blocks which all returnnil, false
just on different structs. This pattern is repeated for a lots ofAs*
funcs.I'm not too sure but I wasn't expecting an 8mb 200,000 line
models.go
file.Open the file: https://github.com/Azure/azure-sdk-for-go/blob/090dc0ee4d8d2d60e2a9525774d967a4111a2b0c/services/datafactory/mgmt/2018-06-01/datafactory/models.go
Nope
The text was updated successfully, but these errors were encountered: