You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generating go code from a module that includes multi-line comments (e.g. aws/constructs), the generated code is invalid.
For example, this typescript code:
/** * All parent scopes of this construct. * * @returns a list of parent scopes. The last element in the list will always * be the current construct and the first element will be the root of the * tree. */publicgetscopes(): IConstruct[]{ ... }
Results in this go code:
// All parent scopes of this construct.//// Returns: a list of parent scopes. The last element in the list will alwaysbethecurrentconstructandthefirstelementwillbetherootofthe
tree.
Scopes []IConstructIface`json:"scopes"`
As you can see, we need to add // prefix to the multiline @returns docstring.
Verbose Log
./constructs.go:457:8: syntax error: unexpected current, expecting semicolon or newline or }
./constructs.go:459:10: syntax error: unexpected ] after top level declaration
The text was updated successfully, but these errors were encountered:
…ts (#2462)
Split multi-line comments and prefix with `//` so they are rendered correctly.
Fixes#2457
---
By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].
[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
🐛 Bug Report
Affected Languages
golang
General Information
What is the problem?
When generating go code from a module that includes multi-line comments (e.g. aws/constructs), the generated code is invalid.
For example, this typescript code:
Results in this go code:
As you can see, we need to add
//
prefix to the multiline@returns
docstring.Verbose Log
The text was updated successfully, but these errors were encountered: