Re: [hibernate-dev] HHH-12372 Restore binary compatibility with applications using the legacy Session#getFlushMode() method
On 8 March 2018 at 14:55, Chris Cranfordwrote: > Sanne - > > On 03/07/2018 07:58 PM, Sanne Grinovero wrote: >> # 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. > I assume this is due to > o.h.envers.internal.entities.mapper.relation.lazy.ToOneDelegateSessionImplementor > ? Yes, exactly: /home/sanne/sources/hibernate-orm/hibernate-envers/src/main/java/org/hibernate/envers/internal/entities/mapper/relation/lazy/ToOneDelegateSessionImplementor.java:19: error: ToOneDelegateSessionImplementor is not abstract and does not override abstract method getFlushMode() in Session public class ToOneDelegateSessionImplementor extends AbstractDelegateSessionImplementor { ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] HHH-12372 Restore binary compatibility with applications using the legacy Session#getFlushMode() method
Sanne - On 03/07/2018 07:58 PM, Sanne Grinovero wrote: > # 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. I assume this is due to o.h.envers.internal.entities.mapper.relation.lazy.ToOneDelegateSessionImplementor ? ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] HHH-12372 Restore binary compatibility with applications using the legacy Session#getFlushMode() method
On 8 March 2018 at 02:44, Steve Ebersolewrote: > > > On Wed, Mar 7, 2018 at 6:59 PM Sanne Grinovero wrote: >> >> 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 > > > Wow, very cool! Thanks for the tool David! > > >> 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 >> > > You mean compile tests using the current project version but run tests > against an older version? If so, by far the easiest option will be a > separate sourceSet. Here you can use the project dependency in testCompile > and the older version in testRuntime. > > If that's not what you mean, can you explain some more? Thanks for the suggestions Steve. I got it working now but used a new project module, which I named "compatibility-testing". Ok to introduce that? It just has some tests using the (legacy) getFlushMode(), and dependencies setup as: dependencies { // [!] Compile with Hibernate ORM 5.1, but then run the tests with the current version testCompileOnly "org.hibernate:hibernate-core:5.1.12.Final" testCompileOnly "org.hibernate:hibernate-testing:5.1.12.Final" testRuntimeOnly project( ':hibernate-core' ) testRuntimeOnly project( ':hibernate-testing' ) } For some reason both Eclipse and IDEA get confused and the code shows as not compiling; it works fine via Gradle though so I'm afraid we'll just have to ignore the IDE warnings. I'll experiment a bit more with sourceSet to see if we can avoid that as it seems very inconvenient; Andrea will be with me this afternoon so maybe he can have a look too. Thanks, Sanne ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] HHH-12372 Restore binary compatibility with applications using the legacy Session#getFlushMode() method
On Wed, Mar 7, 2018 at 6:59 PM Sanne Grinoverowrote: > 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 > Wow, very cool! Thanks for the tool David! 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 > > You mean compile tests using the current project version but run tests against an older version? If so, by far the easiest option will be a separate sourceSet. Here you can use the project dependency in testCompile and the older version in testRuntime. If that's not what you mean, can you explain some more? ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev