-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Avoid print icons when running on Windows OS #14722
Conversation
...codestarts/src/main/java/io/quarkus/devtools/codestarts/core/CodestartProjectGeneration.java
Outdated
Show resolved
Hide resolved
...codestarts/src/main/java/io/quarkus/devtools/codestarts/core/CodestartProjectGeneration.java
Outdated
Show resolved
Hide resolved
...codestarts/src/main/java/io/quarkus/devtools/codestarts/core/CodestartProjectGeneration.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I'll let @ia3andy have the final word ;)
Good job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I think I would prefer having only getIcon
(no getAlternateIcon
), and have the switch inside the getIcon
so that anyone calling it won't have any OS problem.. wdyt?
We shouldn't forget that we also have wrong display for those: https://github.com/quarkusio/quarkus/blob/master/independent-projects/tools/message-writer/src/main/java/io/quarkus/devtools/messagewriter/MessageIcons.java |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice :)
Ah nice catch. Perhaps those need to be refactored as methods? It would be nice if those constants were not public |
...jects/tools/message-writer/src/main/java/io/quarkus/devtools/messagewriter/MessageIcons.java
Show resolved
Hide resolved
@ejba could you give a screenshot of the output when creating a project on Windows? |
...jects/tools/message-writer/src/main/java/io/quarkus/devtools/messagewriter/MessageIcons.java
Outdated
Show resolved
Hide resolved
...mmon/src/main/java/io/quarkus/devtools/commands/handlers/RemoveExtensionsCommandHandler.java
Outdated
Show resolved
Hide resolved
@ia3andy I have to launch a VM for that, it would take time. |
It didn't work out. Should be use an asterisk instead? |
Sure, that makes sense |
How do we set up the encoding? Shouldn't it be specified on DefaultMessageWriter? |
For Also, I think changing For the codestart type icons, you may use |
Yes, it will break the backward compatibility. If it's still the desired change we can apply it at the time we extract the dev tools project into its own repo. |
@@ -108,7 +107,7 @@ public QuarkusCommandOutcome execute(QuarkusCommandInvocation invocation) throws | |||
final CodestartProjectDefinition projectDefinition = catalog.createProject(input); | |||
projectDefinition.generate(invocation.getQuarkusProject().getProjectDirPath()); | |||
invocation.log() | |||
.info("\n-----------\n" + MessageIcons.NOOP_ICON + " " | |||
.info("\n-----------\n" + " " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a new icon named SUCCESS_ICON
with the thumbs up and [SUCCESS] on Windows to use here and everywhere we used the NOOP to mean SUCCESS.
If there are some place [NOOP]
is used a it should (I am not sure there is), we should also choose a new unix icon for it.
@ia3andy We don't have a final decision I think. I did a second commit to be easy to revert the changes. :) |
@ia3andy esthetics is one thing (and it's very personal, I personally don't like emojis, too aggressive for the eye) but using emojis for status report is IMHO counter productive as harder to parse and making things different for Unix and Windows is also a problem as you can't have a tool properly parsing things for both without having to deal with both cases (and you have to think about it). I'm -1 for using emojis on status reports. |
@gsmet What should I do with the enum |
@ejba wait a bit before we settle on this ;-) |
I think this should be decided on the quarkus-dev mailing list. IMO the goal of those icons was purely esthetic and not meant to be parsed in the first place.., in the end maybe we should have both. |
Using both ways raise no harm I believe, and both of you get what you want. |
So, if @gsmet is ok, we could:
Then I think we should rename |
Good for me! |
What's the status of this? |
It's waiting for @ejba update. |
@geoand done |
@ia3andy mind doing a final check please and then merging if all is still OK? Thanks |
private MessageIcons() { | ||
OK_ICON("\u2705", "[SUCCESS]"), | ||
NOK_ICON("\u274c", "[FAILURE]"), | ||
NOOP_ICON("\uD83D\uDC4D", "[FAILURE]"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOOP_ICON("\uD83D\uDC4D", "[FAILURE]"), | |
NOOP_ICON("\uD83D\uDC4D", ""), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOOP means no operation but doesn't mean failure at all. I would put an empty string her.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applying codestarts...
>> java
>> maven
>> quarkus
>> config-properties
>> dockerfiles
>> maven-wrapper
>> resteasy-example
-----------
[FAILURE] quarkus project has been successfully generated in:
--> target\extensions-test
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW I don't think for this message we should use a NOOP, it should be a OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @ejba, it took a few rounds but most important is this is very nice now..
I did a rebase to trigger CI again. It's supposed to pass in all tests, right? |
The failure has nothing to do with the PR, we can merge |
Closes #14219