Skip to content

Conversation

kubukoz
Copy link
Contributor

@kubukoz kubukoz commented Jun 19, 2025

Allow namespaces like smithy4s, but not smithy or smithy.api or other sub-smithy namespaces.

Background

  • What do these changes do?
  • Why are they important?

Testing

  • How did you test these changes?

Links

  • Links to additional context, if necessary
  • Issue #, if applicable (see here for a list of keywords to use for linking issues)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Verified

This commit was signed with the committer’s verified signature.
kubukoz Jakub Kozłowski
"smithy." or an exact match of "smithy"
@kubukoz kubukoz requested a review from a team as a code owner June 19, 2025 22:42
@kubukoz kubukoz requested a review from milesziemer June 19, 2025 22:42
@@ -55,8 +55,8 @@ public final class TraitCodegenSettings {
) {
this.packageName = Objects.requireNonNull(packageName);
this.smithyNamespace = Objects.requireNonNull(smithyNamespace);
if (smithyNamespace.startsWith(SMITHY_API_NAMESPACE)) {
throw new IllegalArgumentException("The `smithy` namespace is reserved.");
if (smithyNamespace.equals(SMITHY_API_NAMESPACE) || smithyNamespace.startsWith(SMITHY_API_NAMESPACE + ".")) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, SMITHY_API_NAMESPACE is set to smithy. Shouldn't it just be smithy.api?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep it this way. The variable needs to be adjusted but we want this value.

@kubukoz
Copy link
Contributor Author

kubukoz commented Jul 1, 2025

Hi team, can we have some eyes on this?

@sugmanue
Copy link
Contributor

sugmanue commented Jul 1, 2025

Yes, apologies for the delay. Let me circle back with the team about it.

@sugmanue sugmanue merged commit 1f3d82c into smithy-lang:main Jul 2, 2025
8 checks passed
@kubukoz kubukoz deleted the less-restrictive-trait-codegen branch July 2, 2025 16:26
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.

None yet

2 participants