Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of arguments of request smart constructors can change during regeneration #435

Open
dudebout opened this issue Jan 3, 2018 · 3 comments

Comments

@dudebout
Copy link
Contributor

dudebout commented Jan 3, 2018

For example, the Name and SourceRegion arguments were swapped in copyImage between 1.5.0 and 1.4.5.

I could trace that specific change to the following change in botocore.

It is unfortunate that in case of argument reordering the Haskell bindings are less safe than the corresponding python ones. I am not quite sure what we can do about it though. In the copyImage case, using the Region type would have helped...

@rcook
Copy link
Contributor

rcook commented Feb 28, 2018

One approach might be for the code generator to generate newtype wrappers for every Text argument.

@mbj
Copy link

mbj commented Jul 3, 2018

One approach might be for the code generator to generate newtype wrappers for every Text argument.

I'd love that approach. Over time the newtime wrappers could even get some smart constructors validating argument specific properties, such as not empty etc.

@endgame
Copy link
Collaborator

endgame commented Apr 17, 2024

A big part of the problem is that we're using HashMap all over the place. #872 will largely fix this, once we start being able to track declaration order in the generator. But that's a while off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants