Closed ctrueden closed 7 years ago
I would find it more intuitive to have a keep.newer.versions
property that is true
per default. I'd get confused if delete.other.versions=false
and delete.older.versions=true
: will it delete anything?
How about having -Dimagej.deleteOtherVersions=always
, -Dimagej.deleteOtherVersions=ifOlder
and -Dimagej.deleteOtherVersions=never
to avoid confusion with two parameters that have overlapping functionality?
@imagejan: I like it! The keep-newer-versions branch features a first version that deprecates the old delete.other.versions
and maps delete.other.versions=true
to imagej.deleteOtherVersions=always
and delete.other.versions=false
to imagej.deleteOtherVersions=never
.
@ctrueden: The keep-newer-versions branch introduces a dependency on a Java implementation of SemVer (JSemVer). I am hesitant to use it since it doesn't seem to be maintained actively. While I could re-implement the parts of the SemVer specification that are relevant for our use-case at the moment (basically version1.greaterThan(version2)
). We might want to check for compatibility in future based on SemVer. Any thoughts?
If JSemVer does what you need, why not just use it? Are you concerned we might find a bug and be unable to get it fixed upstream? The license is MIT so we can just fork it to the org.scijava groupId if needed.
Are you concerned we might find a bug and be unable to get it fixed upstream?
That was my major concern, although I was also hesitant about introducing another dependency and wanted to check with you. But you are right that we could fork it any time.
Also @ctrueden, are you fine with @imagejan's suggestion of -Dimagej.deleteOtherVersions=always / ifOlder / never
? I have taken care to keep backwards compatibility, when delete.other.versions
is set explicitly. If not, default behavior (delete.other.versions
unset) is the same.
are you fine with @imagejan's suggestion of
-Dimagej.deleteOtherVersions=always / ifOlder / never
?
Yes, I think this is a great solution. (I'd suggest older
rather than ifOlder
, but that's a nitpick.)
Thanks for your efforts!
Probably named
-Dimagej.deleteOlderVersions
actually, but we need functionality likedelete.other.versions
but only when the existing libraries are older according to SemVer.