Unverified Commit d5674b8a authored by david-perez's avatar david-perez Committed by GitHub
Browse files

Adjust sSDK error message when using `@range` on floating point shapes (#2727)

To point to a better issue
https://github.com/awslabs/smithy-rs/issues/2007.

Also let users know this is unlikely to ever get implemented.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent 6aa585fa
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -61,10 +61,11 @@ private sealed class UnsupportedConstraintMessageKind {
            shape: Shape,
            constraintTrait: Trait,
            trackingIssue: String,
            willSupport: Boolean = true,
        ) =
            buildMessage(
                "The ${shape.type} shape `${shape.id}` has the constraint trait `${constraintTrait.toShapeId()}` attached.",
                willSupport = true,
                willSupport,
                trackingIssue,
            )

@@ -104,7 +105,12 @@ private sealed class UnsupportedConstraintMessageKind {

            is UnsupportedRangeTraitOnShape -> LogMessage(
                level,
                buildMessageShapeHasUnsupportedConstraintTrait(shape, rangeTrait, constraintTraitsUberIssue),
                buildMessageShapeHasUnsupportedConstraintTrait(
                    shape,
                    rangeTrait,
                    willSupport = false,
                    trackingIssue = "https://github.com/awslabs/smithy-rs/issues/2007",
                ),
            )

            is UnsupportedUniqueItemsTraitOnShape -> LogMessage(
@@ -250,7 +256,7 @@ fun validateUnsupportedConstraints(
        unsupportedConstraintOnNonErrorShapeReachableViaAnEventStreamSet + unsupportedConstraintErrorShapeReachableViaAnEventStreamSet

    // 3. Range trait used on unsupported shapes.
    // TODO(https://github.com/awslabs/smithy-rs/issues/1401)
    // TODO(https://github.com/awslabs/smithy-rs/issues/2007)
    val unsupportedRangeTraitOnShapeSet = walker
        .walkShapes(service)
        .asSequence()