fix: upgrade to Spring Shell 4 - #1956
arnabnandy7 wants to merge 1 commit into
Conversation
29fbe36 to
6813fac
Compare
6813fac to
74dac5b
Compare
igordayen
left a comment
There was a problem hiding this comment.
@arnabnandy7 looks good, are any tests involed. how to deal with other repos that use extensively legacy annotations?
@igordayen the existing All 56 tests passed with no failures, errors, or skipped tests. The full CI build is also passing. Repositories using the legacy Spring Shell annotations will need to migrate when upgrading to this version because Spring Shell 4 no longer provides that annotation API. The main mappings are:
Command names move to |
|
@arnabnandy7 steps to validate possible breakages:
if no breakages, then we can plan other repos upgrades, starting with examples thank you |
|
I guess there is one problem in this change. The first parameter „intent“ of the „execute“ command is annotated with @option but neither shortName nor longName is defined which will not work in my experience. Here the annotation @option seems to be wrong and @argument(index = 0, description = …) to get the same behaviour as before and as described in the the @command annotation. |
Thanks, @igordayen . I followed your suggested validation flow and also checked the downstream repositories you mentioned. First, I built the changes from I ran the Java horoscope example from Testing the downstream repositories exposed some Spring Shell 3/4 compatibility issues, so I prepared the necessary updates:
I’ve attached the consolidated validation log. Based on the checks you requested, the Spring Shell upgrade and downstream command registration have now been validated. |
@urferr thanks for catching this. I updated The focused shell module tests pass, and I verified that the compiled command metadata contains |
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
74dac5b to
6e3e7f9
Compare
|
@arnabnandy7 - thanks for validation on other repos as well. good news - changes on embabel-agent does not affect other repos upon switching to local 1.5.2-snapshot, so new /old shell commands can coexist. regards |
Summary
Upgrade the shell module from Spring Shell 3.x to Spring Shell 4.0.2 for Spring Boot 4 compatibility.
Fixes #1720.
Changes
@ShellComponent→@Component@ShellMethod→@Command@ShellOption→@OptionshortNameandlongNameattributes.Compatibility notes
Spring Shell 4 only supports a single-character short option name. Consequently:
-tdwas removed; use--toolDelay.-odwas removed; use--operationDelay.set-options -salias forshowPlanningis now-P, consistent with theexecutecommand.Verification
mvn clean installreactor build on JDK 21.1.5.2-SNAPSHOTlocally.execute.Result:
BUILD SUCCESSwith exit code0.