You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "vieiro (via GitHub)" <gi...@apache.org> on 2023/04/02 10:48:37 UTC

[GitHub] [netbeans] vieiro opened a new pull request, #5764: Rust output window improvements

vieiro opened a new pull request, #5764:
URL: https://github.com/apache/netbeans/pull/5764

   Improvements to the Rust output window: 
   - re-run action
   - options panel
   - hyperlinks from error messages to source
   - working directory and cargo command is shown in grey colors
   
   ![imagen](https://user-images.githubusercontent.com/564140/229348187-76284bb5-9497-4b3c-acc6-535b7691a4a6.png)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] neilcsmith-net commented on pull request #5764: Rust output window improvements

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on PR #5764:
URL: https://github.com/apache/netbeans/pull/5764#issuecomment-1493901364

   > Nope, `cargo build --color` always looks quite different (see [1]).
   
   The IO tabs do have some support for ANSI colouring, if that's helpful. Might complicate other aspects though?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] vieiro merged pull request #5764: Rust output window improvements

Posted by "vieiro (via GitHub)" <gi...@apache.org>.
vieiro merged PR #5764:
URL: https://github.com/apache/netbeans/pull/5764


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] vieiro commented on pull request #5764: Rust output window improvements

Posted by "vieiro (via GitHub)" <gi...@apache.org>.
vieiro commented on PR #5764:
URL: https://github.com/apache/netbeans/pull/5764#issuecomment-1495783013

   Did a small experiment with these ANSI colorings in the Output Window, and I don't think we're doing a great job here. The choices of java.awt.Color we're [currently doing](https://github.com/apache/netbeans/blob/master/platform/core.output2/src/org/netbeans/core/output2/OutWriter.java#L587) don't look well on light and dark themes, I think (see images below):
   
   - ANSI yellow is hard to see on white backgrounds.
   - ANSI red is not very readable on dark backgrounds.
   
   I think we should improve the way we handle these ANSI colors in another PR, so we can see them properly in both light & dark themes, and then we may think on enabling Rust's `--color=always` .
   
   Meanwhile I think we're ready for merge.
   
   ![imagen](https://user-images.githubusercontent.com/564140/229771679-ddca18ab-cc81-4942-8b9d-3b355c7610f5.png)
   
   ![imagen](https://user-images.githubusercontent.com/564140/229772171-6433311f-87f2-4d1f-a8e3-134718812266.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] vieiro commented on pull request #5764: Rust output window improvements

Posted by "vieiro (via GitHub)" <gi...@apache.org>.
vieiro commented on PR #5764:
URL: https://github.com/apache/netbeans/pull/5764#issuecomment-1495817419

   
   > Agreed. I weep a little every time I see a hard-coded `Color` in the NetBeans code. smile Was just looking at this, and wondering where to tap in to configure these - LAF and editor themes could be relevant, although probably should also go through https://github.com/apache/netbeans/blob/master/platform/core.output2/src/org/netbeans/core/output2/options/OutputOptions.java
   > 
   
   Well, since these are standard ANSI colors I don't think it's a good idea to let the user configure them. We may still hard code some sensible values, that honor the current theme (the defaults you point to look like a good starting point).
   
   By the way, it seems we're using `UIManager.getBoolean("nb.dark.theme")` to check for a dark theme, right? We may want to wrap that idiom around an API in the future, too.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] neilcsmith-net commented on pull request #5764: Rust output window improvements

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on PR #5764:
URL: https://github.com/apache/netbeans/pull/5764#issuecomment-1495804254

   > Did a small experiment with these ANSI colorings in the Output Window, and I don't think we're doing a great job here. The choices of java.awt.Color
   
   Agreed.  I weep a little every time I see a hard-coded `Color` in the NetBeans code. :smile: Was just looking at this, and wondering where to tap in to configure these - LAF and editor themes could be relevant, although probably should also go through https://github.com/apache/netbeans/blob/master/platform/core.output2/src/org/netbeans/core/output2/options/OutputOptions.java
   
   > I think we should improve the way we handle these ANSI colors in another PR, so we can see them properly in both light & dark themes, and then we may think on enabling Rust's `--color=always` .
   
   +1 - seems out of scope to fix here.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] neilcsmith-net commented on pull request #5764: Rust output window improvements

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on PR #5764:
URL: https://github.com/apache/netbeans/pull/5764#issuecomment-1496234829

   > since these are standard ANSI colors I don't think it's a good idea to let the user configure them.
   
   Well, the GNOME terminal lets me configure the palette.  I'm not going to second guess why people might want to configure, for example [this](https://www.bloomberg.com/ux/2021/10/14/designing-the-terminal-for-color-accessibility/) came up while looking for an example (good examples, different terminal!)  We could use colour options in Look and Feels though - at least for FlatLaf, any property can now be overridden via the UI as a fallback option.
   
   > By the way, it seems we're using `UIManager.getBoolean("nb.dark.theme")` to check for a dark theme, right? We may want to wrap that idiom around an API in the future, too.
   
   I have mixed feelings about that - in some ways it's almost as bad as hard coding colours in the first place.  Better to have an API that says "give me the shade of red, blue, green, etc. that works with the current theme".  I may look at that - similar question has come up in at least two other places recently!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] vieiro commented on pull request #5764: Rust output window improvements

Posted by "vieiro (via GitHub)" <gi...@apache.org>.
vieiro commented on PR #5764:
URL: https://github.com/apache/netbeans/pull/5764#issuecomment-1495575453

   So let's merge this as is and let's investigate if it's good idea to add terminal support for Rust in the future. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] vieiro commented on pull request #5764: Rust output window improvements

Posted by "vieiro (via GitHub)" <gi...@apache.org>.
vieiro commented on PR #5764:
URL: https://github.com/apache/netbeans/pull/5764#issuecomment-1493885233

   > Is this the 1to1 representation from the CLI? 
   
   Nope, `cargo build --color always` looks quite different (see [1]).
   
   > I would like to see that warning is not red, it should be a different color like yellowish. I know that in maven sometimes or others we see the same color for Warnings, which is wrong in my opinion and doesn't make sense. Red is errornish. So just asking for this, if this shouldn't be part of the PR then just take it for another PR :)
   
   Yep, this happens to me whenever I compile a NetBeans module too!  Both warnings and errors are all shown in red :-).
   
   
   
   [1]
   ![imagen](https://user-images.githubusercontent.com/564140/229446707-52cc736b-cd1e-4546-be82-98132a71d03d.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] Chris2011 commented on pull request #5764: Rust output window improvements

Posted by "Chris2011 (via GitHub)" <gi...@apache.org>.
Chris2011 commented on PR #5764:
URL: https://github.com/apache/netbeans/pull/5764#issuecomment-1493452231

   Is this the 1to1 representation from the CLI? I would like to see that warning is not red, it should be a different color like yellowish. I know that in maven sometimes or others we see the same color for Warnings, which is wrong in my opinion and doesn't make sense. Red is errornish. So just asking for this, if this shouldn't be part of the PR then just take it for another PR :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] vieiro commented on pull request #5764: Rust output window improvements

Posted by "vieiro (via GitHub)" <gi...@apache.org>.
vieiro commented on PR #5764:
URL: https://github.com/apache/netbeans/pull/5764#issuecomment-1497818163

   > > since these are standard ANSI colors I don't think it's a good idea to let the user configure them.
   > 
   > Well, the GNOME terminal lets me configure the palette. I'm not going to second guess why people might want to configure, for example [this](https://www.bloomberg.com/ux/2021/10/14/designing-the-terminal-for-color-accessibility/) came up while looking for an example (good examples, different terminal!) We could use colour options in Look and Feels though - at least for FlatLaf, any property can now be overridden via the UI as a fallback option.
   > 
   
   Did dome experiments with coloring in the Output window: the conclusion is that it's ok to have coloring in the output window, but for reliable coloring of external commands one should rely on the Terminal window instead.
   
   For the record: screenshot below shows the result of running `cargo run --color=always" on the Output window and the Terminal. The program is printing out some ASCII coloring.  The Output window uses the default text color as "black" (note the "Normal bold" vs "Black bold", etc.).
   
   ![imagen](https://user-images.githubusercontent.com/564140/230148622-5abe0421-e1ad-4a1f-b618-468df10529b3.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] vieiro commented on pull request #5764: Rust output window improvements

Posted by "vieiro (via GitHub)" <gi...@apache.org>.
vieiro commented on PR #5764:
URL: https://github.com/apache/netbeans/pull/5764#issuecomment-1495657787

   > > So let's merge this as is and let's investigate if it's good idea to add terminal support for Rust in the future.
   > 
   > Sure! In fact, didn't realise we had that terminal support already - it wasn't what I meant, although had been thinking of benefit of this for something else. I meant that the normal execution IO will handle some ANSI escape colouring ( [here I think](https://github.com/apache/netbeans/blob/master/platform/core.output2/src/org/netbeans/core/output2/OutWriter.java#L606) )- didn't realise until looking at #5552 - I just wondered if passing `--color` actually works?
   
   D'oh! I didn't know we were acknowledging ANSI coloring in Output window!  It does indeed work (but with poor results on white background, of course). Attaching a screenshot when invoking "cargo build --color=always"..
   
   So let me give it some thought during the following days. We may end up with some nicer result after all.
   
   ![imagen](https://user-images.githubusercontent.com/564140/229751511-27e5dede-5ebd-48bb-94a2-9b18cf31339e.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] neilcsmith-net commented on pull request #5764: Rust output window improvements

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on PR #5764:
URL: https://github.com/apache/netbeans/pull/5764#issuecomment-1495612553

   > So let's merge this as is and let's investigate if it's good idea to add terminal support for Rust in the future.
   
   Sure!  In fact, didn't realise we had that terminal support already - it wasn't what I meant, although had been thinking of benefit of this for something else.  I meant that the normal execution IO will handle some ANSI escape colouring - didn't realise until looking at #5552 - I just wondered if passing `--color` actually works?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] vieiro commented on pull request #5764: Rust output window improvements

Posted by "vieiro (via GitHub)" <gi...@apache.org>.
vieiro commented on PR #5764:
URL: https://github.com/apache/netbeans/pull/5764#issuecomment-1493940247

   > > Nope, `cargo build --color` always looks quite different (see [1]).
   > 
   > The IO tabs do have some support for ANSI colouring, if that's helpful. Might complicate other aspects though?
   
   We may give the `NativeExecutionService` (`dlight/nativeexecution`) a go, and see how it behaves. Substituting `ExecutionService` with `NativeExecutionService`, but with the goal of running in a terminal.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists