-
Notifications
You must be signed in to change notification settings - Fork 39
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
Gtk4 port #223
Gtk4 port #223
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #223 +/- ##
==========================================
+ Coverage 87.24% 87.37% +0.12%
==========================================
Files 1 1
Lines 298 301 +3
==========================================
+ Hits 260 263 +3
Misses 38 38 ☔ View full report in Codecov by Sentry. |
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.
Project.toml
Outdated
@@ -27,8 +27,8 @@ Colors = "0.9, 0.10, 0.11, 0.12" | |||
FileIO = "1.6" | |||
FlameGraphs = "0.2.10, 1" | |||
Graphics = "0.4, 1" | |||
Gtk = "1.2" | |||
GtkObservables = "1" | |||
Gtk4 = "0.5" |
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.
I'd like to keep 0.5 compat as well.
Co-authored-by: Nathan Zimmerberg <[email protected]>
Co-authored-by: Nathan Zimmerberg <[email protected]>
Project.toml
Outdated
@@ -27,8 +27,8 @@ Colors = "0.9, 0.10, 0.11, 0.12" | |||
FileIO = "1.6" | |||
FlameGraphs = "0.2.10, 1" | |||
Graphics = "0.4, 1" | |||
Gtk = "1.2" | |||
GtkObservables = "1" | |||
Gtk4 = "0.5" |
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.
I'd like to keep 0.5 compat as well.
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.
Looks good. I also tested on Linux using Pop!_OS 22.04.
Everything in the GUI works like in the previous version.
I get the warning:
(process:31294): Gtk-WARNING **: 17:38:16.184: No IM module matching GTK_IM_MODULE=ibus found
when opening the viewer, and the following when saving or opening a "testdata.jlprof" file.
(process:31294): Gtk-WARNING **: 17:46:52.667: Attempting to add 'file:///home/nathan/github/ProfileView.jl/testdata.jlprof' to the list of recently used resources, but no name of the application that is registering it was defined
But these don't seem to cause any issues.
I don't see those warnings on Fedora, but they're basically harmless. I wish GTK had a mechanism to silence stuff like that. |
I wonder if the low resolution issue I'm seeing is related to the failure of this test on MacOS.. perhaps the range of sz is too small ProfileView.jl/test/runtests.jl Lines 151 to 159 in f3754d0
|
The second of these warnings should be gone in the most recent version of Gtk4. |
Test failed for me locally on MacOS but with a different error. Adding additional sleep fixed it, and the CI error too. |
Seems like the blurry text rendering is a known and unsolved issue https://gitlab.gnome.org/GNOME/gtk/-/issues/3787 If you think this is ready, I say we go ahead. |
Oh, actually, we're on GTK v4.12 and it's claimed this got better in v4.14 https://blog.gtk.org/2024/03/07/on-fractional-scales-fonts-and-hinting/ |
Sorry for my inattention (too many updates needed for Julia 1.11 in the Revise/Cthulhu/SnoopCompile etc stack). I'll start playing with this, but @jwahlstrand feel free to merge whenever you are ready (you have an invite now). |
Thanks, I'll check one more thing this evening. The weird thing about the font issue is, we're not using GTK to draw the text, it's all Cairo. For me, it's still quite readable, so I think it's worth going ahead. I'll try to update Yggdrasil to GTK 4.14 soon. |
disable rounded corners for GtkFrame adapt to different bounding box behavior in GtkObservables v2
are the Macs just not catching a MethodInstance?
The CI error came back and I think it was happening because the Profile didn't contain much of anything on MacOS, for some reason. Increasing the number of iterations in the profiled function seems to have fixed it. I'm seeing an issue locally, only on my Mac. When ProfileView precompiles, using it right away doesn't work. Sometimes the windows don't appear, sometimes I see the following error, no matter what I try to profile:
But if I quit Julia and restart it, ProfileView works fine. So it seems like precompiling is having some sort of side effect. It's puzzling because ImageView has similar precompile code and works fine. I want to look into this a bit more before merging. |
Thanks for your careful work here! I don't have a Mac, nor any good ideas except to wonder if Mac isn't using COW across forked processes? https://softwareengineering.stackexchange.com/questions/244664/global-variable-in-a-linux-shared-library |
I think there's a bigger issue on macOS. See JuliaLang/julia#53816 (comment) |
I commented out the precompile code that causes issues on my Mac (which involves observable handlers). I don't notice any difference in performance so I'm going to merge this PR and investigate later. |
Thank you @jwahlstrand ! You're a true hero! |
This is ready to try now.