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
Generated typescript for conjure set specification is an Array, which can mislead developers to assume explicit ordering that is not guaranteed by the api contract.
For developers who aren't referring back to the original conjure apis, but relying on the typescript definitions for code-safety, this creates opportunities for bugs that may not pop up until down-the-line when the backend service owners change internal ordering mechanics.
What did you want to happen?
The generated typescript should generate a Set that has the same semantic expectations as the original api contract specification.
The text was updated successfully, but these errors were encountered:
ES Sets use reference equality for any complexity object, which can be unexpected and can result in multiple identical (i.e. deep equality) objects in a set
Changing the bindings (with the associated runtime changes) would be a breaking change to the bindings and internally breaks are incredibly painful to roll out
Ack on the challenges -- I wanted to make sure I filed this as part of P0 remediation. The problem popped up because a FE we maintain was relying on the implicit set ordering, which worked reasonably well until the backend added a filtering step that broke that order.
In looking to the root cause, I had a hard time fully blaming "bad dev practices" as the FE api explicitly specifies an Array type, and I could imagine someone who isn't going back to reference the conjure api might make the poor choice to assume some order, and trust that ordering.
This seems like a reasonable "wontfix", or at least a "delayed until a big break" kind of thing, but I think its worth tracking.
What happened?
Generated typescript for conjure
set
specification is anArray
, which can mislead developers to assume explicit ordering that is not guaranteed by the api contract.This response object
Generates this typescript
For developers who aren't referring back to the original conjure apis, but relying on the typescript definitions for code-safety, this creates opportunities for bugs that may not pop up until down-the-line when the backend service owners change internal ordering mechanics.
What did you want to happen?
The generated typescript should generate a
Set
that has the same semantic expectations as the original api contract specification.The text was updated successfully, but these errors were encountered: