-
Notifications
You must be signed in to change notification settings - Fork 134
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
Replace p11.Slot struct with interface #144
Comments
I'm not against that. It's p11 code so not the main repo, however we've
never had a backwards incompatible change here... So other opinions might
differ
…On Fri, 19 Nov 2021, 18:22 JeremyRand, ***@***.***> wrote:
p11.Session is an interface, which is helpful for use cases where a
downstream user needs to re-implement the API. Alas, p11.Slot is not an
interface, which makes such use cases rather unpleasant. Would a PR be
accepted that makes p11.Slot an unexported struct and adds a public
p11.Slot interface to replace it?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#144>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACWIWZT32YGTLMBXTSLF53UM2BUZANCNFSM5IMUGGVA>
.
|
What's your preferred way of gauging opinions? Just wait some time to see if anyone comments in this issue? If, hypothetically, it were desired to make some of the other structs interfaces as well (the others aren't as high priority for me, but might be a bit helpful in the future), would it be preferable to roll them all into one PR to minimize the number of breaking change events? |
Yeah. Just have to wait.
I'm in favor of doing all the changes at once, forcing folks to deal with
compilation errors. We could do the go V2 stuff as well, but don't want to,
because it's more involved
…On Fri, 19 Nov 2021, 18:46 JeremyRand, ***@***.***> wrote:
What's your preferred way of gauging opinions? Just wait some time to see
if anyone comments in this issue? If, hypothetically, it were desired to
make some of the other structs interfaces as well (the others aren't as
high priority for me, but might be a bit helpful in the future), would it
be preferable to roll them all into one PR to minimize the number of
breaking change events?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#144 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACWIW5BFC2TYYLV7XMOCOLUM2EORANCNFSM5IMUGGVA>
.
|
Okay, so if we're going to roll all the breaking changes into one release, here are my suggestions for additional API changes:
|
Expecting the user to manually cast Objects to Keys is counterintuitive, and also blocks converting the Object and Key structs into interfaces (since the cast targets will not be exported). Adding an explicit method that does the casting allows us to abstract this from the user. Refs miekg#144
p11.Session
is an interface, which is helpful for use cases where a downstream user needs to re-implement the API. Alas,p11.Slot
is not an interface, which makes such use cases rather unpleasant. Would a PR be accepted that makesp11.Slot
an unexported struct and adds a publicp11.Slot
interface to replace it?The text was updated successfully, but these errors were encountered: