Lift Java6 API restrictions from core

759 views
Skip to first unread message

Kohsuke Kawaguchi

unread,
Oct 26, 2013, 4:35:45 PM10/26/13
to jenkin...@googlegroups.com
Since 1.520, we have been producing Jenkins core with Java6 class files, but we haven't so far started using Java6 API so that we can go back to Java5 compatibility in case there's a large uproar.

It's been cloes to 20 releases since then. While some users have noticed this (JENKINS-18592 and JENKINS-16920), given the overwhelming support in the dev list, library dependencies that require Java6, and existence of workarounds, I think we should complete the Java6 migration by finally lifting  "you can't rely on Java6 API" limitation.

Any objections?

Domi

unread,
Oct 27, 2013, 3:47:06 AM10/27/13
to jenkin...@googlegroups.com, jenkin...@googlegroups.com
+1
Just a thought: is there anything we could do to make this more easy in the future,
--
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 jenkinsci-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Stephen Connolly

unread,
Oct 27, 2013, 5:38:25 AM10/27/13
to jenkin...@googlegroups.com
Stop using the crappy maven project type and help me implement a real maven project type ;-)
--
Sent from my phone

Kamal Mettananda

unread,
Oct 27, 2013, 6:09:35 AM10/27/13
to jenkin...@googlegroups.com
+1


---
Kamal Mettananda
www.digizol.com

Jesse Glick

unread,
Oct 28, 2013, 9:45:44 AM10/28/13
to jenkin...@googlegroups.com
On Sun, Oct 27, 2013 at 3:47 AM, Domi <do...@fortysix.ch> wrote:
> Just a thought: is there anything we could do to make this more easy in the future?

See my commented-out section of ProcessCache.MavenProcess.<init>.

Jesse Glick

unread,
Oct 28, 2013, 9:47:58 AM10/28/13
to jenkin...@googlegroups.com
On Sat, Oct 26, 2013 at 4:35 PM, Kohsuke Kawaguchi <k...@kohsuke.org> wrote:
> I think we should complete the Java6 migration by finally
> lifting "you can't rely on Java6 API" limitation.
>
> Any objections?

+1 from me.

Emanuele Zattin

unread,
Oct 28, 2013, 9:54:33 AM10/28/13
to jenkin...@googlegroups.com
+1

Emanuele Zattin
---------------------------------------------------
-I don't have to know an answer. I don't feel frightened by not knowing things; by being lost in a mysterious universe without any purpose — which is the way it really is, as far as I can tell, possibly. It doesn't frighten me.- Richard Feynman


Marcelo

unread,
Oct 28, 2013, 9:57:32 AM10/28/13
to jenkin...@googlegroups.com
+1

Kohsuke Kawaguchi

unread,
Oct 28, 2013, 12:55:11 PM10/28/13
to jenkin...@googlegroups.com

Right.

For example we can tweak the RemoteClassLoader so that it'd warn us if
we try to load Java7 classes inside Maven JVM. Those would be a good
test to have.

If anyone is willing to do it, go for it.


On 10/27/2013 12:47 AM, Domi wrote:
> +1
> Just a thought: is there anything we could do to make this more easy in
> the future,
> ? like Jesse's comment on https://issues.jenkins-ci.org/browse/JENKINS-16920
>
> Am 26.10.2013 um 22:35 schrieb Kohsuke Kawaguchi <k...@kohsuke.org
> <mailto:k...@kohsuke.org>>:
>
>> Since 1.520, we have been producing Jenkins core with Java6 class
>> files, but we haven't so far started using Java6 API so that we can go
>> back to Java5 compatibility in case there's a large uproar.
>>
>> It's been cloes to 20 releases since then. While some users have
>> noticed this (JENKINS-18592 and JENKINS-16920), given the overwhelming
>> support in the dev list, library dependencies that require Java6, and
>> existence of workarounds, I think we should complete the Java6
>> migration by finally lifting "you can't rely on Java6 API" limitation.
>>
>> Any objections?
>>
>> [1]
>> https://groups.google.com/forum/#!topic/jenkinsci-dev/LOMtxbR0Elg/discussion
>> --
>> Kohsuke Kawaguchi
>>
>> --
>> 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 jenkinsci-de...@googlegroups.com
>> <mailto:jenkinsci-de...@googlegroups.com>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>
> --
> 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 jenkinsci-de...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.


--
Kohsuke Kawaguchi | CloudBees, Inc. | http://cloudbees.com/
Try Jenkins Enterprise, our professional version of Jenkins

Jesse Glick

unread,
Oct 28, 2013, 1:24:03 PM10/28/13
to jenkin...@googlegroups.com
On Mon, Oct 28, 2013 at 12:55 PM, Kohsuke Kawaguchi
<kkawa...@cloudbees.com> wrote:
> we can tweak the RemoteClassLoader so that it'd warn us if we
> try to load Java7 classes inside Maven JVM.

As I just mentioned, the remoting library can already do this. (I
wrote the hook months ago.) It just needs to be activated in
maven-plugin. The code to do so is commented out because it was not
clear to me that we wanted to forbid Java 7-specific classes from
being loaded from plugins, if they are advertised as being for Java
7+. The same decision applies to the slave channel: it would be a
one-line change to prevent Java 7 bytecode from being loaded on
slaves, but this might block deliberate usage of plugins with known 7+
dependencies. But the positive side is that we would immediately know
if 7+ bytecode dependencies were *accidentally* introduced in plugins.
We would also know if 7+ bytecode from servlet containers was
“leaking” through the remoting channel.

Perhaps Slave should have an optional NodeProperty to restrict
bytecode level? Then a user who suspects a problem with accidental 7+
dependencies could check the box to enforce 6+ compatibility, and get
a clear error message rather than the opaque ClassFormatError they
currently get.

Kohsuke Kawaguchi

unread,
Oct 29, 2013, 12:19:58 PM10/29/13
to jenkin...@googlegroups.com

I've incorporated this change in
5e7b844b65cf021ce1378bc1a1f78f9bc8a2b33d toward 1.539
Reply all
Reply to author
Forward
0 new messages