On Tuesday, October 20, 2015 at 12:58:30 AM UTC+2, Kohsuke Kawaguchi wrote: > > > > 2015-10-19 12:19 GMT-07:00 Jesse Glick <[email protected] <javascript:> > >: > >> On Mon, Oct 19, 2015 at 2:19 PM, Kohsuke Kawaguchi <[email protected] >> <javascript:>> wrote: >> > Queue.Item.id has known fixed set of subtypes, so we can restrict the >> rewrite to a much smaller subset. >> >> Not sure I follow that. IIUC the problem is outside references to >> `id`. The number of subtypes of `Item` (and the fact that they are all >> in core) is irrelevant. >> > > The only reference to 'id' that we need to rewrite is those for Queue.Item > and its subtypes. Today BCT doesn't assume that the subtypes are finite > fixed set, so it rewrites every reference to com.example.Foo#id based on > the assumption that it might be a subtype of Queue.Item. > > By knowing all the subtypes, we can drastically reduces the amount of > rewrite. > > We don't know the subtypes at compile time - nor at runtime whilst the classes are being loaded - without loading more classes (or at least loading the bytecode for those classes and inspecting said bytecode)
Also it's not the subtypes that need rewriting - it's the accessors of the field in other classes need to be re-written to use the new methods - ( JENKINS-28799 <https://issues.jenkins-ci.org/browse/JENKINS-28799>) - to reduce scope but it is just a sticky-plaster that reduces the amount of incorrect bytecode we may create. Lets for argument sake say we did need to re-write a field in the ruby plugin - would/could we still not hit something like JENKINS-31019 <https://issues.jenkins-ci.org/browse/JENKINS-31019>? -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/18263ca4-502e-4a91-83ff-163e0babadb3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
