Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-65605

`WithBridgeMethods` annotation no longer working in core

    • 2.289.1

      the `WithBridgeMethods` annotation no longer works and so we would break compatibility with plugins using bridge methods from core

      To reproduce,

      hub clone jenkinsci/promoted-builds-plugin
      cd promoted-builds-plugin
      git checkout promoted-builds-3.9.1
      mvn clean test -Djenkins.version=2.288
      

      java.lang.NoSuchMethodError: hudson.model.Queue$WaitingItem.getFuture()Ljava/util/concurrent/Future

          [JENKINS-65605] `WithBridgeMethods` annotation no longer working in core

          James Nord added a comment -

          James Nord added a comment - PR at https://github.com/infradna/bridge-method-injector/pull/25 and discussion in https://groups.google.com/g/jenkinsci-dev/c/TPQum9wHFVg/m/ArW6E-J3AgAJ may need to fork the library as it seems unmainstained.

          James Nord added a comment - - edited

          James Nord added a comment - - edited https://github.com/infradna/bridge-method-injector/releases/tag/bridge-method-injector-parent-1.21 has been released

          Jesse Glick added a comment -

          Note that 1.20 contains the fix for this issue, but we should try to use 1.21.

          Will you file a PR for Jenkins core to pick it up? Or tickle Dependabot to do it? https://github.com/jenkinsci/jenkins/network/updates/133921288 seems to be complaining that we need to merge other dependency PRs first.

          Jesse Glick added a comment - Note that 1.20 contains the fix for this issue, but we should try to use 1.21. Will you file a PR for Jenkins core to pick it up? Or tickle Dependabot to do it? https://github.com/jenkinsci/jenkins/network/updates/133921288 seems to be complaining that we need to merge other dependency PRs first.

          Jesse Glick added a comment -

          Core PR could add a functional test using @WithPlugin to show that a plugin compiled against an ancient version of core can continue to link. (Interactively I verified the fix using javap on Queue$Item.class.)

          Jesse Glick added a comment - Core PR could add a functional test using @WithPlugin to show that a plugin compiled against an ancient version of core can continue to link. (Interactively I verified the fix using javap on Queue$Item.class .)

          James Nord added a comment -

          I was just testing a fix with the affected plugin before pushing upstream and creating a PR.

          James Nord added a comment - I was just testing a fix with the affected plugin before pushing upstream and creating a PR.

            teilo James Nord
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: