aws / aws/jsii

(rosetta): same class in different namespace is confusing

Open
#3,559 0 comments 0 reactions 0 assignees View on GitHub
bug p1
Dominant language
TypeScript
Stars
2.9k
Forks
267
Avg merge
1d 25m
Merged PRs (30d)
14

Description

### Describe the bug

Rosetta might produce the following code which is very confusing to users:

![2022-05-23 at 16 26](https://user-images.githubusercontent.com/524162/169842312-8b888d4f-122a-439d-bef4-1acf13ef6da8.png)

And frankly even incorrect.

### Expected Behavior

One of the classes needs to be renamed, or they need to be referenced by package name.

### Current Behavior

Both have simple imports which isn't valid Java.

### Reproduction Steps

See above

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### SDK version used

-

### Environment details (OS name and version, etc.)

-

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Rosetta output shown in the issue and inspect the generated Java imports for the same-named classes. Trace the Rosetta generation entry point responsible for Java imports, then add coverage for classes sharing a simple name across namespaces. Done means the generated Java uses distinct names or package-qualified references and remains valid Java.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.