Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
jna-posix
was superseded byjnr-posix
in Jenkins core in 2013 in commit 2a1d163, but our fork oforg.jruby.ext.posix:jna-posix
(1.0.3-jenkins-1) remains present for backward compatibility.jna-posix
is not compatible with Java 10+. Carrying this dependency seems undesirable for the Jenkins project in 2021. Isn't it time we moved on?This PR makes incompatible changes to
PosixException
to remove the exposure ofjna-posix
. I usedusage-in-plugins
to look for usages ofPosixException
.PosixException
is used in Copy Artifact, CloudBees Backup Plugin, and Operations Center Context Plugin. But in none of these three cases is the constructor or thegetErrorCode()
method called. They are all just catchingPosixException
. So removing the second argument from the constructor and removinggetErrorCode()
shouldn't break anything.I also used
usage-in-plugins
to look for usages of classes in thejna-posix
JAR as well ashudson.os.PosixAPI#get
,hudson.os.PosixAPI#isNative
, andhudson.os.PosixAPI#supportsNative
. Here we go again.hudson/os/PosixAPI#get()Lorg/jruby/ext/posix/POSIX;
is still used in three ancient plugins:jna-posix
to non-deprecatedjnr-posix
tmpcleaner-plugin#7 to migrate this plugin fromjna-posix
tojnr-posix
.jna-posix
to non-deprecatedjnr-posix
sicci-for-xcode-plugin#2 to migrate this plugin fromjna-posix
tojnr-posix
.I propose we move forward with this removal whether these plugins get released or not.
jna-posix
has been deprecated in Jenkins core for 8 years, and it won't work with Java 11. It's time to move on. Once this PR is merged, I'll file a PR in the Update Center to officially mark these three plugins as deprecated.Proposed changelog entries
Developer: Remove
jna-posix
dependency from Jenkins core. Plugins that usejna-posix
functionality, including Maven Repository Scheduled Cleanup, SICCI for Xcode, and java.io.tmpdir cleaner, must be migrated fromjna-posix
tojnr-posix
.Proposed upgrade guidelines
The
jna-posix
dependency has been removed from Jenkins core. Plugins that usejna-posix
functionality, including Maven Repository Scheduled Cleanup, SICCI for Xcode, and java.io.tmpdir cleaner, are no longer supported and must be removed.Submitter checklist
Proposed changelog entries
section only if there are breaking changes or other changes which may require extra steps from users during the upgradeMaintainer checklist
Before the changes are marked as
ready-for-merge
:Proposed changelog entries
are correctupgrade-guide-needed
label is set and there is aProposed upgrade guidelines
section in the PR title. (example)lts-candidate
to be considered (see query).