Releases: spring-projects/spring-shell
3.0.0-M3
Generic Notes
Fixes
This milestone uses Spring Boot 3.0.0
and contains some notable changes:
- Usual bug fixes
- New testing modules
Issues
#576 Build sample with musl on linux
#575 ShellOption not registered without hyphens
#574 Upgrade spring-boot 3.0.0
#572 Method execution should not error without value
#568 Upgrade spring-boot 3.0.0-RC2
#567 Handle whitespace in option value
#565 Auto-config classes should use @autoConfiguration
#558 Docs updates
#552 Fix e2e flow.test.ts locally
#516 JLine Terminal should be configurable
#489 Provide a testing framework
2.1.4
Generic Notes
Fixes
This GA contains some notable changes:
- Builds on Spring Boot 2.7.6
- Some bug fixes backported
Issues
#577 backport(575) ShellOption not registered without hyphens
#573 backport(572) Method execution should not error without value
#571 Upgrade spring-boot 2.7.6
#570 backport(567) Handle whitespace in option value
3.0.0-M2
Generic Notes
Fixes
This milestone uses Spring Boot 3.0.0-RC1
and contains some notable changes:
- Hidden commands
- Truncate long text in components
- Better exception handling
- More descriptive error message when required option is not present
- New
PathSearch
Component
Here are some screencasts for new functionality.
Issues
#561 Make assertj dependency optional
#557 Upgrade spring-boot 3.0.0-RC1
#556 PathSearch component
#555 Docs updates
#548 Parser should process types
#543 Components should truncate long text
#503 More descriptive error message when required option is not present
#416 Support hidden commands
2.1.3
3.0.0-M1
Generic Notes
Fixes
This milestone contains some notable changes:
- Using Spring Boot 3.x
- Support for GraalVM mostly complete
- Project is now build with gradle
Issues
#540 Upgrade native-build-tools 0.9.14
#535 Fix release workflows for gradle
#529 Improve JPMS support by adding Automatic-Module-Name
#527 Docs changes
#526 Prevent ExtendedDefaultParser warning
#525 Add starter for jansi
#524 Move starter modules under starters
#523 Upgrade spring-boot 3.0.0-M5
#521 Could not find org.springframework.shell:spring-shell-management:3.0.0-SNAPSHOT.
#510 next does not work as expected in ComponentFlow
#506 Upgrade gradle 7.5.1
#504 Split builtin command docs
#495 Incorrect completion for options
#493 Spring shell is defaulting to the base Jakarta validator
#490 Provide needed aot configs
#486 Build publish broken
#470 Switch to gradle
#385 Rework for boot 3.x
PRs
#520 Docs correctness!
2.1.2
2.1.1
Generic Notes
Fixes
This GA contains some notable changes:
- Builds on Spring Boot 2.7.3
- Some bug fixes backported
Issues
#505 backport(504) Split builtin command docs
#500 Upgrade spring-boot 2.7.3
#498 backport(495) Incorrect completion for options
#496 backport(493) Spring shell is defaulting to the base Jakarta validator
2.1.0
Generic Notes
Fixes
This GA contains some notable changes:
- Builds on Spring Boot 2.7.2
- Some styling changes
- Help commands now knows about aliases
- MultiItemSelector component can now have items selected on default
- Some fixes on @ShellOption
Issues
#480 Add commands as list in help templating
#477 Upgrade to Spring Boot 2.7.2
#476 Component styling bad for black on white
#461 ShellOption booleans are now mandatory in 2.1.0-RC1
#458 Help should group commands with aliases
#454 Create GA release workflow
#446 Missing option error without ShellOption
#426 Add aliases info to help
PRs
#468 Add the possibility of default selection to MultiItemSelector
#455 Fix typos in using-shell-options-optional.adoc
Additional Notes
Recap
Earlier this year we started an effort align the project with latest Spring Boot
and Spring Framework
versions as it was difficult to use existing Spring Shell
release of a spring family.
Originally the main issue we wanted to address was a removal of a bean cycles which Spring Boot
is now enforcing by default. While this feature can be turned off it is not something Spring Shell should require. This required a lot of changes and we chose to handle it with rework of a shell internals. One big challenge was how the old Spring Shell
worked by essentially keeping command info methods backed by @ShellMethod
annotations and then calling those methods via reflection using not so well defined ways.
Now that it was clear that we needed to do a bigger overhaul it made sense to do further development now rather than waiting for Spring Boot 3
and Spring Framework 6
which Spring Shell
eventually would have needed to support.
Here is a recap of the changes that were done:
Command Registration
CommandRegistration
is a new programmatic way to define commands. The existing annotation model of commands translates to these registration behind a scene. This new registration model now allows to us control commands dynamically which wasn't the case in the old shell implementation.
Existing Annotations
What comes for @ShellMethod
and @ShellOption
We've tried to keep those compatible and future development will most likely introduce new annotations more aligned with CommandRegistration
.
Theming
Modern terminal implementations are not bound to just show a simple text, but allow for different types of font styles and can be used with colors. In the old Spring Shell
these were mostly hard coded while it was possible to use ANSI sequences via JLine
to write anything into a console. It made sense to introduce a theming system where text written can be styled and figures chosen per style. Figures are just unicode characters supported by modern terminals which is the basis for creating pretty shell UI's.
UI Components
You've mostly likely used various CLI tools which go beyond just asking some text from a user and then doing something based on that. For example GitHub CLI is a good example as some of its commands enter interactive mode and ask users for input using various tricks like selector lists and other sort of shell style forms.
What we wanted to accomplish in Spring Shell
was to create these components which can be use independently or combine those into a flow.
Graal
A big topic in a future Spring Framework release is native compilation with GraalVM. This obviously makes a big impact on the CLI side as that little jvm bootstrap timeout goes away when your existing code is translated into native binary.
With 2.1.x
it was shown using our experimental Spring Native project that it is possible to create a Spring Shell application which works the same way in Linux, MacOS and Windows.
Official support for GraalVM in Spring Shell comes with 3.x
.
Templating
Writing a command into a terminal is easy as you essentially just write something. However what we've done in some of the built-in commands like help
is not always something a user wants to have or they may have other reasons to modify how it looks. Some default outputs from Spring Shell
are now based on templates based on ST4 from the ANTRL
project.
This allows a user to replace templates used in Spring Shell
and modify default behaviour. These templates also integrate into the theme framework so that it's possible to define templates per active theme.
2.1.0-RC1
Generic Notes
Fixes
With this release candidate some notable changes were done.
- Dynamic availability implemented
- Theming functionality went through a rework
- Interactive mode completion went through a rework
- Experimental spring native support is now complete
- Some tweaks to make interactive commands to fail fast in non-tty envs
Issues
#452 Separate commit and push in release workflow
#449 Rework interactive completion
#445 ConfirmationInput should have resultValue
#444 Components can't use interactive mode without tty
#442 Rework themes support
#433 Update Docs
#423 Fix Availability
#323 add support to spring-native
2.1.0-M5
Generic Notes
Fixes
This release has a fixes to few issues found in a previous milestone.
Issues
#437 Exit code customisation broken
#436 Option with @ShellOption not marked as required
#435 Fix ConversionService auto-config
#431 Add support for exit codes
#424 Support option label
#401 Testing e2e
PRs
#432 Capturing CTRL+D (EOF) to exit the shell