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
fix(rosetta): incorrect transliteration for selective imports (#3508)
Go does nto support "selective" imports, and has limited symbol aliasing
support. Instead of attempting to transliterate selective imports with
a one-to-one semantic mapping, resolve the imported symbols and emit the
correct qualified original name instead.
This results in more idiomatic (and likely more correct) go code.
For example:
```ts
import { Foo as RenamedFoo, Bar } from 'baz';
const foo = new RenamedFoo();
Bar.baz(foo);
```
Should transliterate to something looking like:
```go
import "github.com/aws-samples/dummy/baz"
foo := baz.NewFoo()
Bar_baz(foo)
```
---
Bonus content:
- Now emits README.md for submodules, too (was previously ignored).
- Missing newlines between go import statements are now inserted.
---
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
0 commit comments