On Wed, Sep 24, 2014 at 8:47 PM, Mark Waite <[email protected]> wrote: > I added a new test to the git client plugin which depended on a Java 7 NIO > feature. It failed to compile in my test configuration with Java 6.
I think it is fine to require Java 7 in tests; there was already a proposal which met with no controversy to require 7 for building plugins, while continuing to use -target 6 and Animal Sniffer to prevent accidental use of 7+ APIs or bytecode (*). Requiring 8 for building plugins, and thus allowing -source 8 features in src/test/java/**/*.java (**), would be a natural next step, a bit controversial but much less so than requiring 8 for running Jenkins itself. (*) Of course this means functional tests do not find runtime problems occurring on 6 despite lack of linkage errors. But the alternative of running tests on 6 just means the reverse problem, that behavioral changes in 7 which break the plugin are not caught; and this is worse, since many more people will really be running on 7. (**) The upcoming version of Animal Sniffer allows you to skip checks on test-scope dependencies. But it might not yet allow checks to be skipped on src/test/java/**/*.java, which is not a dependency; will need to look into it. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
