-
Notifications
You must be signed in to change notification settings - Fork 196
Let the shim functions return an error #67
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
Comments
Agreed |
Do you want me to start hammering out a pull request, or will you do this? :) |
I probably won't have time to look at this until later this week. Pull requests more than welcome. |
I will try to take a look at it the next few days. Any pointers on where to look? |
You'll also want to look at |
It may make sense to implement this as a different directive. It may be tough to preserve backwards-compatibility otherwise. |
I just ran out of time after fixing a bug in one of my projects, and then trying out your appengine build tag stuff. I will try to look at this during the weekend. |
@philhofer, would you be happy for me to pick this up? I really need this functionality too and I'm happy to do the work. Agree it should be a different directive. |
Yeah, if you feel like taking a shot at this, go for it.
… On Jul 4, 2017, at 10:22 PM, Blake Williams ***@***.***> wrote:
@philhofer, would you be happy for me to pick this up? I really need this functionality too and I'm happy to do the work. Agree it should be a different directive.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
OK I have a first pass of this, some feedback would be great! Ended up adding an optional extra argument to the directive instead of a new directive. The zero value defaults to the existing behaviour:
I ran into some sticky stuff with the size calculations. These shim functions could be doing all kinds of different stuff under the hood so it seems like it may be a performance tradeoff between running the shim function twice to get an accurate size or running it once and guessing the size, even if that guess will almost certainly be wrong in the case where the base type is a string. Either that or I'm missing something about how to do it more effectively... there's a good chance of that. "Convert" might be a less than ideal name for it too as there is already a member on BaseElem called Convert, but I couldn't think of something better at the time. |
* #67 - Let the shim functions return an error
Reckon we can close this one off or does it still need a bit more work? |
At least the decode implementation usually has a few error cases, and it would be nice if those errors could be properly propagated.
The text was updated successfully, but these errors were encountered: