There is a 'use case' where things break 1. You enable assertions in some library, such as the java runtime 2. someone tries to run your build file on a pre 1.4 system with an old version of the library
I was about to say on a pre 1.4 system if fork =false then you know the target JVM version, and so can ignore the settings, but of course you cant turn asserts on that late into the game. What you can do on a pre 1.4 box is warn the user that bad things are going to happen. We could also have another option flag or specify what to do with asserts. <assert use="ifcurrentJVM" > ... or "true", "false" . That way you could set a property to turn asserts on or off on a per user basis, but still leave assert statements in the <java> call. What do people think? -Steve NB, I have 1.4b on a system now, so can play with these assert flags. ----- Original Message ----- From: "Jeff Brown" <[EMAIL PROTECTED]> To: "Ant Developers List" <[EMAIL PROTECTED]> Sent: Wednesday, November 21, 2001 5:50 PM Subject: Re: assertion changes For clarification, I want to add some comments about the version compatibility issue with the proposed assertion enabling features. None of the Ant code proposed here requires 1.4. All of this will compile and execute fine with 1.1. Using the new features would require 1.4. The new features include passing "-da" and "-ea" to the interpreter via new optional attributes and elements in the java target, which are not valid options pre 1.4. This would be a problem if someone tried to use this feature, but they were using a pre 1.4 vm. Why would that ever happen? It wouldn't. The only reason to ever add these new options to your build file would be to enable or disable assertions. You would not do that unless your code had assertions in it to begin with. If your code has assertions in it, you are already imposing on the user that they must have 1.4. Code with assertions that was compiled under 1.4 will run just fine on pre 1.4 vms, but will not compile with a pre 1.4 compiler. If someone is accessing your source code and you have assertions in your source code, they will need 1.4 to build, regardless of wether these new features are added to Ant. I hope that all makes sense. I have been taking advantage of these features for several weeks now and I think others would also. Please let me know if I can answer any questions about this. Thanks. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
