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

Include uri in log of dependencyBrowseTree #7396

Merged
merged 1 commit into from Oct 7, 2023

Conversation

mkurz
Copy link
Member

@mkurz mkurz commented Oct 7, 2023

I am running sbt on Arch Linux on a M1 MacBook Pro (therefore arch64 architecture). I will not go into details too much, but I am using Wayland (instead of X11), which is the new thing in the Linux world that manages all the graphics stuff so you can launch windows etc. Everything is switching to Wayland now, however for applications/frameworks which did not switch yet, there is a layer called XWayland which make it possible to run X11 apps in Wayland.
Java does not yet support Wayland, but work is undergoing, specially pushed by JetBrains because they want to make IntelliJ run natively in Wayland. The project page is: https://wiki.openjdk.org/display/wakefield/Pure+Wayland+toolkit+prototype

Anyway.
Because I am running Wayland, but Java does not support it yet, when I run dependencyBrowseTree the browser does not open but instead I get:

[info] Opening in browser...
[error] java.lang.UnsupportedOperationException: The BROWSE action is not supported on the current platform!
[error]         at java.desktop/java.awt.Desktop.checkActionSupport(Desktop.java:380)
[error]         at java.desktop/java.awt.Desktop.browse(Desktop.java:524)
[error]         at sbt.plugins.DependencyTreeSettings$.$anonfun$openBrowser$1(DependencyTreeSettings.scala:248)
...

I will not be able to fix this myself, so instead I just want the log to include the URI that should be opened so I can just open it myself. So with help of this pull request the log will then display:

[info] Opening file:/home/mkurz/some-cool-sbt-project/target/tree.html in browser...

It's just a stupid workaround which makes my life a bit easier. Thanks!

@mkurz
Copy link
Member Author

mkurz commented Oct 7, 2023

CLA is signed, not sure why this fails: https://www.lightbend.com/contribute/cla/scala/check/mkurz
Also I thought sbt is now lead by Scala Center, so this check might not be necessary anymore?

@eed3si9n
Copy link
Member

eed3si9n commented Oct 7, 2023

Thanks for the contribution.

Scala CLA signs your copyright away to EPFL, instead of Lightbend, but the CLA checker is hosted by Lightbend.

@eed3si9n
Copy link
Member

eed3si9n commented Oct 7, 2023

We can backport this later but could we initially target 1.10.x branch plz?

@mkurz mkurz changed the base branch from 1.9.x to 1.10.x October 7, 2023 14:20
@mkurz mkurz changed the title [1.9.x] Include uri in log of dependencyBrowseTree Include uri in log of dependencyBrowseTree Oct 7, 2023
@mkurz
Copy link
Member Author

mkurz commented Oct 7, 2023

Done

@eed3si9n eed3si9n merged commit 5d6d30e into sbt:1.10.x Oct 7, 2023
9 of 10 checks passed
@mkurz mkurz deleted the uri_log_dependencyBrowseTree branch October 7, 2023 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants