Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dev mode launch on Windows, replace jline with Aesh in the quarkus-maven-plugin #19760

Merged

Conversation

aloubyansky
Copy link
Member

Fixes #19673

  • replaced jline with Aesh in the quarkus-maven-plugin (Aesh is already present on the classpath as the quarkus-core-deployment dependency)
  • moved the Prompter class back to the quarkus-maven-plugin (otherwise we'll need extra dependencies in devtools-common for no reason)
  • shaded jansi into the quarkus-maven-plugin (to fix classloading on Windows)
  • Made the Prompter a regular class, not a Maven Component

@quarkus-bot quarkus-bot bot added area/arc Issue related to ARC (dependency injection) area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/maven area/platform Issues related to definition and interaction with Quarkus Platform labels Aug 29, 2021
read(connection, ReadlineBuilder.builder().enableHistory(false).build(), prompts.iterator());
connection.openBlocking();
} finally {
connection.close();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stuartwdouglas quick question. I've switched the Maven plugin's prompter from jline to Aesh (since it's already on the classpath anyway). I was wondering whether i should restore the terminal's state like you do in the DevMojo (https://github.com/quarkusio/quarkus/blob/main/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java#L445) or is it ok to simply close the connection. I am not doing anything fancy here, simply collecting the input. Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then you should be ok. I put the terminal in raw mode so if the process crashes I need to restore it to the original state.

@aloubyansky aloubyansky force-pushed the exclude-jline-from-maven-plugin branch from bcdb10c to 0cfb90e Compare August 29, 2021 21:58
Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gastaldi
Copy link
Contributor

Funny, I thought Aesh was permanently removed from Quarkus, looks like I was wrong 😛

<configuration>
<artifactSet>
<includes>
<include>org.fusesource.jansi:jansi</include>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work with Maven 3.8.2?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@knutwannheden just confirmed to me it works for both 3.8.1 and 3.8.2.
This change actually reduces the number of Jansi versions on the classpath by removing JLine which shades a Jansi version. With change we shade the Jansi version which is already on the classpath. Why exactly we have to do this to make it work is mystery to me though.

@aloubyansky aloubyansky merged commit 45511d9 into quarkusio:main Aug 30, 2021
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Aug 30, 2021
@gsmet gsmet modified the milestones: 2.3 - main, 2.2.1.Final Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection) area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/maven area/platform Issues related to definition and interaction with Quarkus Platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: Quarkus 2.2.0 breaks Dev Mode on Windows
4 participants