[hibernate-dev] HHH-12372 Restore binary compatibility with applications using the legacy Session#getFlushMode() method
Sanne Grinovero
sanne at hibernate.org
Wed Mar 7 19:58:46 EST 2018
Hi all,
good news on the backwards compatibility; David suggested we could use
his "bridger" tool to have the Session API binary compatible with
older versions.
- https://github.com/dmlloyd/bridger
I created a prototype patch, it's all actually quite self-explanatory:
- https://github.com/Sanne/hibernate-orm/commit/8d14a5efa29e6682a7d823a2252873a8d319cc7c
I had more trouble testing it.
Here a failed approach: I could not get Gradle to compile with a
different version used for testing, while at the same time not driving
dependencies in my IDE nuts :)
- https://github.com/Sanne/hibernate-orm/commit/28f5110cf9ccee9614bceb454036d5204cf9ff6f
Next, I resorted to an external, trivial Maven project; this worked
beautifully! You can see the warnings in the logs suggesting "you're
using a method which doesn't exist anymore, but it's ok.." .
- https://github.com/Sanne/binary-compatibility-test
Next steps:
# Agree on applying the approach? I see no problems with it but
clearly this will need to be supported by us all.
# Figure out how to get the integration tests working in the ORM / Gradle build
# Fix some pending problem with Envers: it's no longer compiling as a
non-abstract extension of Session doesn't implement getFlushMode;
might be tricky or not, I've not looked yet.
# See if we can avoid listing the placeholder method in javadocs
Thanks,
Sanne
More information about the hibernate-dev
mailing list