Skip to content

Conversation

joewyz
Copy link

@joewyz joewyz commented Oct 16, 2025

Description of changes:
This PR is aimed to fix two problems:

  1. Current implementation added type into the reserved-words.txt and this approach is too broad.
    We want to only resolve the conflict when the name type is used, for example, Union or Enum.

  2. The original approach to resolve implicit name conflict tried to add all symbols generated under the same package into each file's symbolTable which caused some unnecessary name conflicts.
    We only want to resolve the conflicts when those auto-imported java.lang.* classes like illegalArgumentException are used and one class with the same name defined under the same namespace.

For example, the ShapeSerializer is used with a fully qualified name even though it is imported. This happened because one shape also called ShapeSerializer was generated under the same namespace and added into this file's symbol table.

import software.amazon.smithy.java.core.serde.ShapeSerializer;

...

@Override
public void serializeMembers(software.amazon.smithy.java.core.serde.ShapeSerializer serializer) {

}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sugmanue sugmanue self-requested a review October 17, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants