You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My CI machine (Linux, x86) shows required first, then length (when traits are queried via model.expectShape(ShapeId.from("example.public#TraitOrderingTest$ident")).getAllTraits()).
My local machine (Mac, arm64) shows length first.
This doesn't seem to be just a difference in the file location (which has been a culprit before), as I tried the CI path and it yields the same result as my local path.
Here's a scala-cli snippet to quickly see the order (and the reported line numbers of the traits, which are correct):
{smithy.api#length=Trait `smithy.api#length`, defined at example-service.smithy [13, 5], smithy.api#required=software.amazon.smithy.model.traits.RequiredTrait@f4b52789}
List(13, 12)
I suppose the question is: is this OK, or should traits be returned in the order they're written? Or at least, in deterministic order.
The text was updated successfully, but these errors were encountered:
Hi! I ran into what appears to be a discrepancy between how traits get ordered between multiple machines. For example, for this shape:
My CI machine (Linux, x86) shows
required
first, thenlength
(when traits are queried viamodel.expectShape(ShapeId.from("example.public#TraitOrderingTest$ident")).getAllTraits()
).My local machine (Mac, arm64) shows
length
first.This doesn't seem to be just a difference in the file location (which has been a culprit before), as I tried the CI path and it yields the same result as my local path.
Here's a scala-cli snippet to quickly see the order (and the reported line numbers of the traits, which are correct):
On my machine, it outputs:
I suppose the question is: is this OK, or should traits be returned in the order they're written? Or at least, in deterministic order.
The text was updated successfully, but these errors were encountered: