Skip to content
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

fix(rosetta): incorrect transliteration for selective imports #3508

Merged
merged 3 commits into from
May 6, 2022

Commits on May 2, 2022

  1. fix(rosetta): incorrect transliteration for selective imports

    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)
    ```
    RomainMuller committed May 2, 2022
    Configuration menu
    Copy the full SHA
    b2fd0bd View commit details
    Browse the repository at this point in the history

Commits on May 6, 2022

  1. Configuration menu
    Copy the full SHA
    b920eda View commit details
    Browse the repository at this point in the history
  2. linter fix

    RomainMuller committed May 6, 2022
    Configuration menu
    Copy the full SHA
    a1c7c58 View commit details
    Browse the repository at this point in the history