feat: replace JLine with TamboUI for dependency search TUI#2465
feat: replace JLine with TamboUI for dependency search TUI#2465maxandersen wants to merge 4 commits into
Conversation
Migrate jbang's CLI framework from picocli to aesh, leveraging aesh's compile-time annotation processor to eliminate runtime reflection and improve startup performance. Key changes: - Replace all picocli annotations (@command, @option, @parameters) with aesh equivalents (@CommandDefinition, @GroupCommandDefinition, @option, @argument, @arguments, @OptionList, @OptionGroup, @mixin) - Convert Callable<Integer> commands to Command<CommandInvocation> with CommandResult return type - Port custom type converters, parameter consumers, and preprocessors to aesh Converter and OptionParser interfaces - Implement external plugin command discovery in help output - Add default value provider using aesh's post-parse processing - Wire mutual exclusion validation via aesh's exclusiveWith - Restore version checking, dynamic completion, option aliases, negatable options, and grouped help sections - Regenerate native-image configuration for aesh - Update tests for aesh CLI parsing Performance (vs picocli, median): - Native image: 6ms vs 33ms (5.5x faster) for single commands - JDK 25: 109ms vs 228ms (2.1x faster) - JDK 11: 149ms vs 269ms (1.8x faster)
Replace the picocli-based genadoc.java (934 lines) with an aesh-based version (~300 lines) that generates the same asciidoc man page format. Uses aesh's ProcessedCommand/ProcessedOption API to traverse the command tree and extract metadata. Generates 63 pages with proper jbang- prefixed names, hierarchical nav.adoc, and tagged sections matching the existing format.
- Cache: fix groovyc cache toggle using wrong variable (kotlincs instead of groovys) — --groovyc flag was silently broken - Config: fix typo "removed from in" → "removed from" - RunMixin: serialize --jfr with = format for StrictOptionParser - RunMixin: serialize --no-cds when explicitly set to false - RunMixin: don't serialize javaagent value as "null" for valueless entries - Alias: use LinkedHashMap in groupingBy to preserve sort order
- Replace JLine (jline-console-ui, jline-terminal-jni) with TamboUI (tamboui-toolkit, tamboui-aesh-backend) 0.4.0-SNAPSHOT - Rewrite ArtifactSearchWidget using TamboUI toolkit DSL - dock() layout: search input (top), results (center), details+help (bottom) - Async Central search via runner.schedule() + runOnRenderThread() - Match highlighting on all result rows using SearchFuzzedResult - Version picker as side pane (Enter on artifact) - Deduplicate results by groupId:artifactId - Add SearchIntentClassifier: detects GAV, class name, FQCN, Java import, compiler error, keyword — routes to appropriate Central query (c:/fc:/etc) - Auto-triggers Central search with 400ms debounce for class/import intents - Support --offline flag (reuses existing BaseCommand.offline via Util) - Remove JLine dependencies and ComboBox.java - Custom key bindings: unbind Tab/focusNext so Tab triggers Central search, unbind q/Q from quit to allow typing in search - Net jar size delta: +33KB
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
|
Why is this PR so big and has many changes that seem to have nothing to do with a change to Tamboui? |
|
@quintesse its dependent on #2453 so it has all those changes too. so looks much bigger than it is. More correct is just looking at For now still just a draft - wanting to see if full build had any challenges. |
Summary
Replace JLine with TamboUI for the
jbang deps searchinteractive TUI.Changes
Dependencies
jline-console-ui,jline-terminal-jnitamboui-toolkit:0.4.0-SNAPSHOT,tamboui-aesh-backend:0.4.0-SNAPSHOTTUI rewrite (
ArtifactSearchWidget)runner.schedule(), results marshalled back withrunOnRenderThread(), generation counter discards stale resultsSearchFuzzedResult.highlightTarget()--offline/-oflag viaUtil.isOffline()Search intent classifier (
SearchIntentClassifier)Classifies user input to route to the best Central query:
jackson databindjackson databindObjectMapperc:ObjectMappercom.fasterxml.jackson.databind.ObjectMapperfc:com.fasterxml...import com.fasterxml...ObjectMapper;fc:com.fasterxml...error: package org.jsoup does not existorg.jsoupcom.fasterxml:jackson-databind:2.20.0Key bindings
Removed
ComboBox.java(JLine widget)Dependencies