From c32e241bee61ad5495ea26ea91b6733ed42265e5 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 15 Aug 2023 16:00:44 -0700 Subject: [PATCH] fix: awslabs -> smithy-lang and other naming changes (#283) --- .github/workflows/test_models_dafny_verification.yml | 2 +- .github/workflows/test_models_java_tests.yml | 2 +- .github/workflows/test_models_net_tests.yml | 2 +- README.md | 2 +- TestModels/dafny-dependencies/Model/traits.smithy | 2 +- cfn/ci.yaml | 2 +- codegen/build.gradle.kts | 4 ++-- .../src/main/java/software/amazon/polymorph/CodegenCli.java | 4 ++-- .../amazon/polymorph/smithydotnet/DotNetNameResolver.java | 2 +- .../amazon/polymorph/smithyjava/nameresolver/Native.java | 2 +- .../main/java/software/amazon/polymorph/utils/ModelUtils.java | 2 +- .../smithydotnet/AwsSdkTypeConversionCodegenTest.java | 2 +- .../polymorph/smithydotnet/ServiceCodegenSmokeTest.java | 2 +- .../amazon/polymorph/smithydotnet/ServiceCodegenTest.java | 2 +- .../amazon/polymorph/smithydotnet/ShimCodegenTest.java | 2 +- .../polymorph/smithydotnet/TypeConversionCodegenTest.java | 2 +- smithy-dafny-conversion/build.gradle.kts | 4 ++-- .../software/amazon/smithy/dafny/conversion/ToNative.java | 2 +- 18 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test_models_dafny_verification.yml b/.github/workflows/test_models_dafny_verification.yml index e5c711abd..683a95b18 100644 --- a/.github/workflows/test_models_dafny_verification.yml +++ b/.github/workflows/test_models_dafny_verification.yml @@ -26,7 +26,7 @@ on: jobs: verification: # Don't run the nightly build on forks - if: github.event_name != 'schedule' || github.repository_owner == 'awslabs' + if: github.event_name != 'schedule' || github.repository_owner == 'smithy-lang' strategy: matrix: library: [ diff --git a/.github/workflows/test_models_java_tests.yml b/.github/workflows/test_models_java_tests.yml index f7960452e..4fcc1bd19 100644 --- a/.github/workflows/test_models_java_tests.yml +++ b/.github/workflows/test_models_java_tests.yml @@ -26,7 +26,7 @@ on: jobs: testJava: # Don't run the nightly build on forks - if: github.event_name != 'schedule' || github.repository_owner == 'awslabs' + if: github.event_name != 'schedule' || github.repository_owner == 'smithy-lang' strategy: matrix: library: [ diff --git a/.github/workflows/test_models_net_tests.yml b/.github/workflows/test_models_net_tests.yml index ee129def7..65dca60b7 100644 --- a/.github/workflows/test_models_net_tests.yml +++ b/.github/workflows/test_models_net_tests.yml @@ -26,7 +26,7 @@ on: jobs: testDotNet: # Don't run the nightly build on forks - if: github.event_name != 'schedule' || github.repository_owner == 'awslabs' + if: github.event_name != 'schedule' || github.repository_owner == 'smithy-lang' strategy: matrix: library: [ diff --git a/README.md b/README.md index 80db15429..f2894c98d 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ which is not yet published anywhere outside of this repository. We'd like to provide this functionality as another Smithy build plugin in the future, likely named something like `dafny-library-codegen`. If you're interested in this use case we'd love to hear from you - -feel free to [cut us an issue](https://github.com/awslabs/smithy-dafny/issues/new)! +feel free to [cut us an issue](https://github.com/smithy-lang/smithy-dafny/issues/new)! See the [`codegen/smithy-dafny-codegen-cli`](codegen/smithy-dafny-codegen-cli) directory for further details and examples. diff --git a/TestModels/dafny-dependencies/Model/traits.smithy b/TestModels/dafny-dependencies/Model/traits.smithy index 40fbc56ea..1841af139 100644 --- a/TestModels/dafny-dependencies/Model/traits.smithy +++ b/TestModels/dafny-dependencies/Model/traits.smithy @@ -73,6 +73,6 @@ structure mutableLocalState {} // This is a workaround that should be removed when // Smithy-Dafny properly supports @documentation -// https://github.com/awslabs/smithy-dafny/issues/247 +// https://github.com/smithy-lang/smithy-dafny/issues/247 @trait(selector: "*") string javadoc \ No newline at end of file diff --git a/cfn/ci.yaml b/cfn/ci.yaml index 97f28d707..556783b8c 100644 --- a/cfn/ci.yaml +++ b/cfn/ci.yaml @@ -13,7 +13,7 @@ Parameters: GitHubRepo: Type: String Description: GitHub Repo that invokes CI - Default: awslabs/smithy-dafny + Default: smithy-lang/smithy-dafny Resources: DDBDafnyTestTable: diff --git a/codegen/build.gradle.kts b/codegen/build.gradle.kts index 8bce603e8..2e5fa89f5 100644 --- a/codegen/build.gradle.kts +++ b/codegen/build.gradle.kts @@ -138,7 +138,7 @@ subprojects { pom { name.set(subproject.extra["displayName"].toString()) description.set(subproject.description) - url.set("https://github.com/awslabs/smithy") + url.set("https://github.com/smithy-lang/smithy") licenses { license { name.set("Apache License 2.0") @@ -156,7 +156,7 @@ subprojects { } } scm { - url.set("https://github.com/awslabs/smithy.git") + url.set("https://github.com/smithy-lang/smithy.git") } } } diff --git a/codegen/smithy-dafny-codegen-cli/src/main/java/software/amazon/polymorph/CodegenCli.java b/codegen/smithy-dafny-codegen-cli/src/main/java/software/amazon/polymorph/CodegenCli.java index 1a509d134..2e3869077 100644 --- a/codegen/smithy-dafny-codegen-cli/src/main/java/software/amazon/polymorph/CodegenCli.java +++ b/codegen/smithy-dafny-codegen-cli/src/main/java/software/amazon/polymorph/CodegenCli.java @@ -55,11 +55,11 @@ public static void main(String[] args) { final Model serviceModel = assembler.assemble().unwrap(); // If Smithy ever lets us configure this: - // https://github.com/awslabs/smithy/blob/f598b87c51af5943686e38706847a5091fe718da/smithy-model/src/main/java/software/amazon/smithy/model/loader/ModelLoader.java#L76 + // https://github.com/smithy-lang/smithy/blob/f598b87c51af5943686e38706847a5091fe718da/smithy-model/src/main/java/software/amazon/smithy/model/loader/ModelLoader.java#L76 // We can remove this log statement. // (Alternatively, We could inline `addImport`, // and ignore dfy & md files. Link to `addImport` below) - // https://github.com/awslabs/smithy/blob/f598b87c51af5943686e38706847a5091fe718da/smithy-model/src/main/java/software/amazon/smithy/model/loader/ModelAssembler.java#L256-L281 + // https://github.com/smithy-lang/smithy/blob/f598b87c51af5943686e38706847a5091fe718da/smithy-model/src/main/java/software/amazon/smithy/model/loader/ModelAssembler.java#L256-L281 LOGGER.info("End annoying Smithy \"No ModelLoader was able to load\" warnings.\n\n"); final Map outputDirs = new HashMap<>(); diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithydotnet/DotNetNameResolver.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithydotnet/DotNetNameResolver.java index 40181f336..7acff4510 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithydotnet/DotNetNameResolver.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithydotnet/DotNetNameResolver.java @@ -62,7 +62,7 @@ public DotNetNameResolver(Model model, ServiceShape serviceShape) { * Returns the C# namespace containing the C# implementation/interface for the given shape ID. */ public String namespaceForShapeId(final ShapeId shapeId) { - // TODO remove special AWS SDK special-case when https://github.com/awslabs/polymorph/issues/7 is resolved + // TODO remove special AWS SDK special-case when https://github.com/smithy-lang/smithy-dafny/issues/7 is resolved final Function segmentMapper = AwsSdkNameResolverHelpers.isInAwsSdkNamespace(shapeId) ? StringUtils::capitalize : DotNetNameResolver::capitalizeNamespaceSegment; diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithyjava/nameresolver/Native.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithyjava/nameresolver/Native.java index 3e8a873a5..81c08f4b7 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithyjava/nameresolver/Native.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithyjava/nameresolver/Native.java @@ -140,7 +140,7 @@ public TypeName typeForShape(final ShapeId shapeId) { * "Boolean, byte, short, integer, long, float, and double shapes * are only considered boxed if they are marked with the box trait. * All other shapes are always considered boxed." - * https://awslabs.github.io/smithy/1.0/spec/core/type-refinement-traits.html#box-trait + * https://smithy.io/1.0/spec/core/type-refinement-traits.html#box-trait * While Smithy Models SHOULD use Smithy Prelude shapes to avoid this confusion, * they do not have to. * Hence, the need to check if these shapes have the box trait diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/utils/ModelUtils.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/utils/ModelUtils.java index 03d4515b3..ae23bb44f 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/utils/ModelUtils.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/utils/ModelUtils.java @@ -33,7 +33,7 @@ public class ModelUtils { // Require title-case alphanumeric names, so we don't need to check for keyword conflicts. // // The spec recommends a similar stricter definition for consistency (uppercase instead of title-case): - // https://awslabs.github.io/smithy/1.0/spec/core/constraint-traits.html?highlight=enum#enum-trait + // https://smithy.io/1.0/spec/core/constraint-traits.html?highlight=enum#enum-trait private static final Pattern ENUM_NAME_PATTERN = Pattern.compile("^[A-Z]+[A-Za-z_0-9]*$"); /** diff --git a/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/AwsSdkTypeConversionCodegenTest.java b/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/AwsSdkTypeConversionCodegenTest.java index 7431001bc..8bfdf1f92 100644 --- a/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/AwsSdkTypeConversionCodegenTest.java +++ b/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/AwsSdkTypeConversionCodegenTest.java @@ -16,7 +16,7 @@ public class AwsSdkTypeConversionCodegenTest { // TODO: Apply "Errors" refactor to Tests - // https://github.com/awslabs/polymorph/issues/25 + // https://github.com/smithy-lang/smithy-dafny/issues/25 private static final String SERVICE_NAMESPACE = "com.amazonaws.foobar"; private static final String SERVICE_NAME = "FoobarService"; private static final ShapeId SERVICE_SHAPE_ID = ShapeId.fromParts(SERVICE_NAMESPACE, SERVICE_NAME); diff --git a/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/ServiceCodegenSmokeTest.java b/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/ServiceCodegenSmokeTest.java index 5652e9b03..3cbb77dc6 100644 --- a/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/ServiceCodegenSmokeTest.java +++ b/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/ServiceCodegenSmokeTest.java @@ -23,7 +23,7 @@ public class ServiceCodegenSmokeTest { // TODO: Apply ServiceCodegen changes to tests - // https://github.com/awslabs/polymorph/issues/27 + // https://github.com/smithy-lang/smithy-dafny/issues/27 @Test public void testCorrectFilesGenerated() { final URL modelUrl = Objects.requireNonNull(this.getClass().getClassLoader().getResource("model.smithy")); diff --git a/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/ServiceCodegenTest.java b/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/ServiceCodegenTest.java index 83a45cf47..c8aa65cf7 100644 --- a/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/ServiceCodegenTest.java +++ b/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/ServiceCodegenTest.java @@ -36,7 +36,7 @@ public class ServiceCodegenTest { // TODO: Apply ServiceCodegen changes to tests - // https://github.com/awslabs/polymorph/issues/27 + // https://github.com/smithy-lang/smithy-dafny/issues/27 @Test public void testGenerateEmptyService() { final Model model = TestModel.setupModel(); diff --git a/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/ShimCodegenTest.java b/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/ShimCodegenTest.java index 39b7be7ff..9379e4cf9 100644 --- a/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/ShimCodegenTest.java +++ b/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/ShimCodegenTest.java @@ -22,7 +22,7 @@ public class ShimCodegenTest { // TODO: Apply ShimCodegen refactor to tests - // https://github.com/awslabs/polymorph/issues/28 + // https://github.com/smithy-lange/smithy-dafmy/issues/28 private static ShimCodegen setupCodegen(final BiConsumer updater) { final Model model = TestModel.setupModel(updater); final ServiceShape serviceShape = model.expectShape(SERVICE_SHAPE_ID, ServiceShape.class); diff --git a/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/TypeConversionCodegenTest.java b/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/TypeConversionCodegenTest.java index 220e93d38..c30973457 100644 --- a/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/TypeConversionCodegenTest.java +++ b/codegen/smithy-dafny-codegen/src/test/java/software/amazon/polymorph/smithydotnet/TypeConversionCodegenTest.java @@ -39,7 +39,7 @@ public class TypeConversionCodegenTest { // TODO: Apply TypeConversionCodegen refactor to tests - // https://github.com/awslabs/polymorph/issues/29 + // https://github.com/smithy-lang/smithy-dafny/issues/29 private static TypeConversionCodegen setupCodegen(final BiConsumer updater) { final Model model = TestModel.setupModel(updater); final ServiceShape serviceShape = model.expectShape(SERVICE_SHAPE_ID, ServiceShape.class); diff --git a/smithy-dafny-conversion/build.gradle.kts b/smithy-dafny-conversion/build.gradle.kts index 6d2c10372..78ce40d14 100644 --- a/smithy-dafny-conversion/build.gradle.kts +++ b/smithy-dafny-conversion/build.gradle.kts @@ -77,7 +77,7 @@ publishing { pom { name.set("Smithy :: Dafny :: Conversion") description.set("Convert Native Java Types to Dafny Runtime Types and vice versa") - url.set("https://github.com/awslabs/smithy") + url.set("https://github.com/smithy-lang/smithy") licenses { license { name.set("Apache License 2.0") @@ -95,7 +95,7 @@ publishing { } } scm { - url.set("https://github.com/awslabs/smithy.git") + url.set("https://github.com/smithy-lang/smithy.git") } } } diff --git a/smithy-dafny-conversion/src/main/java/software/amazon/smithy/dafny/conversion/ToNative.java b/smithy-dafny-conversion/src/main/java/software/amazon/smithy/dafny/conversion/ToNative.java index 5d87d4b81..da744a90e 100644 --- a/smithy-dafny-conversion/src/main/java/software/amazon/smithy/dafny/conversion/ToNative.java +++ b/smithy-dafny-conversion/src/main/java/software/amazon/smithy/dafny/conversion/ToNative.java @@ -195,7 +195,7 @@ public static Set GenericToSet( ) { // From the Smithy Docs: // "Implementations SHOULD use insertion ordered sets" - // https://awslabs.github.io/smithy/1.0/spec/core/model.html#set + // https://smithy.io/1.0/spec/core/model.html#set // Thus, we use a LinkedHashSet Set returnSet = new LinkedHashSet<>(dafnyValues.size(), 1); dafnyValues.Elements().forEach(value ->