-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Remove getset #144
Remove getset #144
Conversation
getset & its proc-macro-error dependencies seem unmaintained In particular, I'm not confident I can get upstream to update to syn 2 I also don't think getter/setter patterns make particular sense in Rust Use `_hidden: ()` in places to maintain capability to add fields without breaking semver
7efad49
to
9c7b942
Compare
dde167d
to
2231395
Compare
@serprex Thank you! I have checked all usage of While I think it's ok to have direct member access over getter/setter, in particular when |
If you don't want to have a breaking change I can look to create a minimal getset macro based on the rather straightforward use of the crate here |
No worry. We can have breaking change during 0.x phase. |
Changes in nexus due to pgwire 0.19 changes: sunng87/pgwire#147 sunng87/pgwire#144
Changes in nexus due to pgwire 0.19 changes: sunng87/pgwire#147 sunng87/pgwire#144
Changes in nexus due to pgwire 0.19 changes: sunng87/pgwire#147 sunng87/pgwire#144
Changes in nexus due to pgwire 0.19 changes: sunng87/pgwire#147 sunng87/pgwire#144
Changes necessary because of 1. sunng87/pgwire#144 2. sunng87/pgwire#147
Changes necessary because of 1. sunng87/pgwire#144 2. sunng87/pgwire#147 Tests were failing due to hanging in 0.19.0, 0.19.1 fixed hang: sunng87/pgwire#148
I just realized that a major drawback of pub struct + pub field access is it stops from adding new fields in semver non-breaking change. Because the initializer syntax |
That is prevented by #[non_exhaustive] |
Yes, we need to add this attribute carefully on each struct during 0.x phase. Adding this attribute is a breaking change too. |
getset & its proc-macro-error dependencies seem unmaintained (jbaublitz/getset#84 (comment) jbaublitz/getset#87 (comment))
In particular, I'm not confident I can get upstream to update to syn 2
I also don't think getter/setter patterns make particular sense in Rust
Use
#[non_exhausitive]
in places to maintain capability to add fields without breaking semverIn some places I omitted
#[non_exhaustive]
where I didn't think it should be necessary, if you disagree let me know & I'll apply it more widely. Similarly, just let me know if you don't think#[non_exhaustive]
is necessaryIn some cases only getters were implemented, in those cases I implemented getter methods by hand & left the fields non-public