[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: java-compiler useless?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> Therefore, packages must depends on gcj|jikes|... and
> have lots of code to determine which is being used.

My java packages tend to build-depend on just one of these compilers, since 
unfortunately the compilers are not all as compatible as you'd like them to 
be, and furthermore they all provide different sets of core classes and have 
different bugs, and often there's only one compiler available that I *know* 
will build the package correctly.  So I build-depend on gcj-3.2 or whatever, 
tailor the build process to that specific compiler and then I at least have 
the comfort of knowing that any build should work without errors and produce 
a correct binary, and I don't have to do any juggling to find out which 
compiler is being used.

(Well, for a while libreadline-java did a bit of juggling because it was 
arch-dependent and no one compiler was available for enough archs, but I've 
recently changed that build to use gcj-3.2 only, which is now available for 
all of the archs I had before).

> Would it not be better to say that packages providing java-compiler must
> provide javac, which in turn must provide features x, y and z.

This is probably a good idea; it's nice for packages like jython which call 
javac at runtime, i.e., on the user's machine (not the build machine), in 
which case you don't want to force the user into using any specific compiler.

> Then
> there could be a simple build-depend on java-compiler and use of javac
> throughout the build.

I still like to err on the side of overly-specific with my build-depends and 
force a specific compiler at build time, because I want to be sure that the 
package will always build correctly from source regardless of what the 
/usr/bin/javac alternative is set to.  But that's just my personal 
preference.

Ben.

- -- 

Ben Burton
benb@acm.org  |  bab@debian.org
Public Key: finger bab@db.debian.org

Bad artists always admire each others work.
	- Oscar Wilde

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE9nYM5MQNuxza4YcERAj6RAJ9iDH3AZqe3EWcZt3xdTZ6X+jkh6wCggynB
5IVJAFC81wiQ9qwzQpscvm4=
=W+WQ
-----END PGP SIGNATURE-----



Reply to: