tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Armstrong <a...@tagish.com>
Subject Re: #define JK_VERSION in j-t-c (doesn't exist)
Date Fri, 15 Jun 2001 12:43:45 GMT
GOMEZ Henri wrote:
> 
> >OK, but I was thinking of something numeric so it could easily
> >be tested
> >at compile time, for example
> >
> >#if defined(JK_VERSION) && JK_VERSION >= 1
> >    ... newer stuff ...
> >#endif
> >
> >Strings are fine for user readable versioning, but hard to test at
> >compile time.
> 
> I understand better there :=)
> 
> Instead of avoid #ifdef/#endif in all the sources, we'll use the
> CVS and make release. People who want STABLE release, will grab
> a STABLE SNAPSHOT. JTC developpers will continue from CVS.

OK, I get that but the Domino connector (in particular) is fairly
immature -- it's quite likely that bugs will be found that would affect
both people using stable Tomcat releases and those on the development
track -- it would nice to fix any such bugs in a single source file.

I suppose my requirement is unusual in that the Domino connector is
available both as a retrofit for current Tomcat releases and as part of
the j-t-c development track -- most other connector code will have been
frozen as part of the relevant Tomcat release. If the versioning
information isn't useful to other people I'll happily sort my particular
requirements some other way, but I'm still inclined to use #if/#endif
with some suitable swicth to bracket code that's only usable with the
latest jk code.

> >b) People working on the cutting edge j-t-c stuff who will be using the
> >latest versions of everything.
> >
> >Ideally I'd like the source for the connector to be the same in either
> >case with conditional stuff to include functionality required by later
> >jk versions. I assume this would be useful for other connector
> >developers too.
> 
> Let be carefull here since having too much #ifdef/#endif will 'pollute'
> the code. I'd like better have the EXPERIMENTAL switch as used

I take the point about excessive #ifdef/#endif use -- I've seen plenty
of C source code rendered practically unreadable in this way. I didn't
know about the EXPERIMENTAL switch. What are the semantics of that?

> >As to the mapping between textual versions and numeric one way to do it
> >would be to reserve a certain number of digits for each part of the
> >version string so you'd have something like this:
> >
> >     1.0.1 ==>  10001
> >    12.3.6 ==> 120306
> 
> Ok

-- 
Andy Armstrong, Tagish

Mime
View raw message