-
Notifications
You must be signed in to change notification settings - Fork 274
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
[Draft] Manual edits in generated code to compiling against v0.4.0
gen output
#1959
Closed
vincenttran-msft
wants to merge
1
commit into
vincenttran/initial_codegen_tsp_issues
from
vincenttran/initial_codegen_manualedits
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 29 additions & 26 deletions
55
sdk/storage/storage_blob/src/generated/clients/internal_models.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the right naming convention. You're
azure_storage_blob
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Heath, that is correct. This is currently what is coming right out of the current routes and definitions in https://github.com/Azure/azure-rest-api-specs/blob/feature/blob-tsp/specification/storage/Microsoft.BlobStorage/tspconfig.yaml (aside from some stop-gap edits for NYI features).
As we are on that topic though, is this what you are envisioning regarding the structure?
Current example for where generated
BlobBlobClient
lives:sdk/storage/storage_blob/src/generated/clients/blob_blob_client.rs
Desired destination:
sdk/storage/azure_storage_blob/src/generated/clients/blob_blob_client.rs
storage_blob
would then be a module containing the generated client and models, and is defined and used in theazure_storage_blob
crate? If so, I can pass this information along to Catalina and Joel that we are moving towards that directory structure- as presently this is what the results of the current latest typespec and emitter (v0.4.0
) combination outputs: #1958As for the hand-edits to generated code, that was for illustrating what the desired changes to generated code should look like, and is being tracked here: https://github.com/Azure/typespec-rust/issues/183
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
storage_blob
doesn't exist in that scenario. You'd have aazure_storage_blobs
(plural; same naming convention as every other language) crate where the clients live in the root. Again, like most other languages. Implementations should be idiomatic, yes, but naming should be idiomatically consistent (i.e. the same, ignoring casing differences). That means for "packages" (nupkgs, wheels, jars, crates, etc.) as well as namespaces/modules.