-
Notifications
You must be signed in to change notification settings - Fork 90
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
[WIP] feat: move source files to "src" folder #432
Conversation
OutputFileLocation is used for import
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.
Most of these comments are broadly applicable to other parts of the code
...pescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CodegenVisitor.java
Outdated
Show resolved
Hide resolved
@@ -429,7 +430,7 @@ private void generateClient(ServiceShape shape) { | |||
for (OperationShape operation : containedOperations) { | |||
if (operation.hasTrait(PaginatedTrait.ID)) { | |||
hasPaginatedOperation = true; | |||
String outputFilename = PaginationGenerator.getOutputFilelocation(operation); | |||
String outputFilename = CodegenUtils.SOURCE_FOLDER + "/" + PaginationGenerator.getOutputFilelocation(operation); |
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.
All these get output file location operations / constants should embed this prefix rather than you adding it on in post.
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.
If I update output file location, the import in index.ts
imports from src
instead directly.
- Original commit which added prefix in output file location
34658f6
(#432) - It was moved outside to fix exports in index.ts
4d9d063
(#432)
Should I remove src
while exporting from IndexGenerator instead?
Or use some abstraction which removes src
automatically?
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.
You could have a getOutputFilelocation
and getOutputNamespace
or some such, the latter of which would not include src.
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.
Done in 53b6977
(#432)
String serviceSymbolName = serviceSymbol.getName(); | ||
writer.addImport(serviceSymbolName, serviceSymbolName, | ||
"./" + CodegenUtils.SOURCE_FOLDER + serviceSymbol.getNamespace().substring(1)); |
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.
String serviceSymbolName = serviceSymbol.getName(); | |
writer.addImport(serviceSymbolName, serviceSymbolName, | |
"./" + CodegenUtils.SOURCE_FOLDER + serviceSymbol.getNamespace().substring(1)); | |
writer.addUseImports(serviceSymbol); |
If that doesn't work, the symbol itself needs updated.
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.
writer.addUseImports(serviceSymbol);
This doesn't work.
I need to update Symbol while creating it in SymbolVisitor right?
https://github.com/awslabs/smithy-typescript/blob/5a242c73bcfeac9d637dce3203dff90d[…]va/software/amazon/smithy/typescript/codegen/SymbolVisitor.java
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.
right
Commenting here for future reference. The commit in |
Checkpoint #2: client creation works for ACM
Superceded by #434 |
Issue #, if available:
Refs: aws/aws-sdk-js-v3#1306
Description of changes:
Move source files to "src" folder
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.