Antlr3.Runtime version conflicts

379 views
Skip to first unread message

Trinition

unread,
Aug 18, 2009, 10:49:53 AM8/18/09
to nhusers, bsaya...@creditinfonet.com
I've been successfully using NHibernate 2.1 in my project for several
weeks. Now I'm adding StringTemplate 3.2 into the mix. Both NHibernate
2.1 and StringTemplate 3.2 depend upon Antlr3.Runtime, but apparently
they depend upon differing versions. NHibernate 2.1 comes with
Antlr3.Runtime version 3.1.0.39271 while StringTemplate 3.2 comes with
Antlr3.Runtime version 3.1.3.6002. I can't seem to get my application
to satisfy both NHibernate's and StringTemplate's dependencies. Is
there a good way of solving this problem?

Tuna Toksoz

unread,
Aug 19, 2009, 12:08:47 PM8/19/09
to nhu...@googlegroups.com
if there are breaking changes, you can use assembly redirection, if there is no breaking change, compile one against other's antlr dll

Tuna Toksöz
Eternal sunshine of the open source mind.

http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
http://twitter.com/tehlike

Trinition

unread,
Aug 20, 2009, 2:34:25 PM8/20/09
to nhusers
I looked into assembly binding redirection, but it didnt' work because
the
Antlr3.Runtime versions I'm working with seem to have different public
keys
(I think... not sure).
I'll ponder whether I want o have to compile my own version of
NHibernate
against the newer Antlr3.Runtime.

Thanks!

Regards,
Brian.

On Aug 19, 12:08 pm, Tuna Toksoz <tehl...@gmail.com> wrote:
> if there are breaking changes, you can use assembly redirection, if there is
> no breaking change, compile one against other's antlr dll
>
> Tuna Toksöz
> Eternal sunshine of the open source mind.
>
> http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitter.com/tehlike

Fabio Maulo

unread,
Aug 20, 2009, 11:10:45 PM8/20/09
to nhu...@googlegroups.com
ILMerge...
probably we will use it in next version

2009/8/20 Trinition <trin...@gmail.com>



--
Fabio Maulo

Trinition

unread,
Aug 26, 2009, 12:43:48 PM8/26/09
to nhusers
For what its worth, I grabbed the NHibernate 2.1 source locally and
pointed its Antlr3.Runtime reference to the version from
StringTemplate (requiring me to upgrade the project to .NET 3.5), and
I immediately had compile errors. For examlpe, in HqlLexer, the
Antlr.Runtime.Collections.StackList type wasn't avaialble: the
Antlr.Runtime.Collections namespace doesn't even exist!

So I'm thinking there's no easy fix!

On Aug 20, 11:10 pm, Fabio Maulo <fabioma...@gmail.com> wrote:
> ILMerge...probably we will use it in next version
>
> 2009/8/20 Trinition <trinit...@gmail.com>
>
>
>
>
>
>
>
> > I looked into assembly binding redirection, but it didnt' work because
> > the
> > Antlr3.Runtime versions I'm working with seem to have different public
> > keys
> > (I think... not sure).
> > I'll ponder whether I want o have to compile my own version of
> > NHibernate
> > against the newer Antlr3.Runtime.
>
> > Thanks!
>
> > Regards,
> > Brian.
>
> > On Aug 19, 12:08 pm, Tuna Toksoz <tehl...@gmail.com> wrote:
> > > if there are breaking changes, you can use assembly redirection, if there
> > is
> > > no breaking change, compile one against other's antlr dll
>
> > > Tuna Toksöz
> > > Eternal sunshine of the open source mind.
>
> >http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitt...

Trinition

unread,
Aug 26, 2009, 3:01:49 PM8/26/09
to nhusers
I've now used ILMerge to merge NHibernate 2.1's Antlr3.Runtime
assembly into the NHibernate assembly (with Antlr3.Rutnime's types
"internalized"). That produced a hopeful output; however, now
NHibernate.Linq and other assemblies complained because the new
NHibernate.dll did not match their string reference to the official
NHibernate assembly.

Then I tried merging the NHibernate.Linq assembly into the merged
assembly as well. Internalizing its types made Linq unavailable. So
then I tried it without internalization but used union instead. Its
still failing saying it needs the original NHibernate assembly:

Error 6 The type 'NHibernate.ISession' is defined in an assembly that
is not referenced. You must add a reference to assembly 'NHibernate,
Version=2.1.0.4000, Culture=neutral,
PublicKeyToken=aa95f207798dfdb4'...


On Aug 20, 11:10 pm, Fabio Maulo <fabioma...@gmail.com> wrote:
> ILMerge...probably we will use it in next version
>
> 2009/8/20 Trinition <trinit...@gmail.com>
>
>
>
>
>
>
>
> > I looked into assembly binding redirection, but it didnt' work because
> > the
> > Antlr3.Runtime versions I'm working with seem to have different public
> > keys
> > (I think... not sure).
> > I'll ponder whether I want o have to compile my own version of
> > NHibernate
> > against the newer Antlr3.Runtime.
>
> > Thanks!
>
> > Regards,
> > Brian.
>
> > On Aug 19, 12:08 pm, Tuna Toksoz <tehl...@gmail.com> wrote:
> > > if there are breaking changes, you can use assembly redirection, if there
> > is
> > > no breaking change, compile one against other's antlr dll
>
> > > Tuna Toksöz
> > > Eternal sunshine of the open source mind.
>
> >http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitt...
Reply all
Reply to author
Forward
0 new messages