Initial shot at using Gtk on Julia 1.3+ by staticfloat · Pull Request #447 · JuliaGraphics/Gtk.jl (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation22 Commits18 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

staticfloat

Note that this requires the Julia 1.3+ version of cairo as well (which is why the Project.toml shows Cairo.jl as being dev'ed)

This doesn't work totally yet; it crashes halfway through the tests on my mac because it can't load some icons.

This now passes all tests locally, but the windows that pop up are never drawn into; they remain white. More debugging information below.

@staticfloat

@staticfloat

@staticfloat

@staticfloat

…XDG_DATA_DIRS` and more~

giordano

@staticfloat @giordano

Co-Authored-By: Mosè Giordano giordano@users.noreply.github.com

@staticfloat

@staticfloat

To attract a wild Mose to your project, leave a newline at the end of your .gitignore as a gentle offering.

@staticfloat

@tknopp

giordano

@tknopp

For reference here is a list of TODO items:

giordano

dirname(hicolor_icons_dir),
joinpath(dirname(GTK3_jll.libgdk3_path), "..", "share"),
get(ENV, "XDG_DATA_DIRS", nothing),
]), ":")

Choose a reason for hiding this comment

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

Shouldn't the separator be a semicolon on Windows? @ianshmean can you please check if this fixes the issue you reported yesterday? As far as I can see, this variable is not currently set on Windows, so I'm not sure this will be sufficient...

@tknopp

@codecov

@staticfloat

@staticfloat

@staticfloat

On my linux desktop, using Gtk on this branch takes 15s, which is abysmal.

We know that at least 30% of this is due to a regression in type inference, at least 10% of it is due to missing precompile statements in Pkg, and there is a suspiciously large amount of code being generated within the JLL precompilation files. We're looking into it, but these issues almost certainly will not be fixed in 1.3, but will have to be addressed with a 1.3.1 release.

@staticfloat

Windows seems to be failing to create the gdk-pixbuf cache. I'm investigating.

@tknopp

Windows seems to be failing to create the gdk-pixbuf cache. I'm investigating.

Just on AppVeyor, right? On Travis CI its is working on windows. The only thing is that one warning we see on all platforms.

@staticfloat

That's correct; I'm guessing there's some kind of DLL missing in the cut-down Travis environment or something, because in my test on a full windows workstation, it works just fine. I'm not going to look into it anymore then. :)

@tknopp

If Travis runs reliably, there is no need for appVeyor.

@giordano

@staticfloat

It looks like the while sleep 540 ; do echo "===== saying hello to Travis ====="; done loop keeps running in the background forever.

@giordano

That was to keep Travis awake in the aarch64 build 😩

@staticfloat

I think you're going to need to do a little bit of job control on windows; after the main script has ended, you'll need to kill your background task. This is probably only a problem on windows.

@giordano

@staticfloat

Run test on Travis on x86 and arm64, too

@jonathanBieler

I'm trying this on windows 10 (julia v1.3 and Cairo master) but I'm getting this :

julia> using Gtk [ Info: Precompiling Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44] WARNING: redefining constant libgdk WARNING: redefining constant libgtk

(julia.exe:9416): GLib-GObject-WARNING **: 21:11:40.394: cannot register existing type 'GApplication'

(julia.exe:9416): GLib-GObject-WARNING **: 21:11:40.395: cannot add private field to invalid (non-instantiatable) type ''

(julia.exe:9416): GLib-GObject-WARNING **: 21:11:40.396: cannot register existing type 'GActionGroup'

(julia.exe:9416): GLib-GObject-CRITICAL **: 21:11:40.396: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

(julia.exe:9416): GLib-CRITICAL **: 21:11:40.396: g_once_init_leave: assertion 'result != 0' failed

(julia.exe:9416): GLib-GObject-CRITICAL **: 21:11:40.396: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(julia.exe:9416): GLib-GObject-WARNING **: 21:11:40.396: cannot register existing type 'GActionMap'

(julia.exe:9416): GLib-GObject-CRITICAL **: 21:11:40.396: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

(julia.exe:9416): GLib-CRITICAL **: 21:11:40.397: g_once_init_leave: assertion 'result != 0' failed

(julia.exe:9416): GLib-GObject-CRITICAL **: 21:11:40.398: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(julia.exe:9416): GLib-CRITICAL **: 21:11:40.398: g_once_init_leave: assertion 'result != 0' failed

(julia.exe:9416): GLib-GObject-CRITICAL **: 21:11:40.399: g_type_register_static: assertion 'parent_type > 0' failed

(julia.exe:9416): GLib-GObject-WARNING **: 21:11:40.400: cannot add private field to invalid (non-instantiatable) type ''

(julia.exe:9416): GLib-CRITICAL **: 21:11:40.400: g_once_init_leave: assertion 'result != 0' failed ERROR: LoadError: LoadError: Could not find gtk_application in libgtk. This is likely a issue with a missing Gtk.jl version check. Stacktrace: [1] error(::String) at .\error.jl:33 [2] top-level scope at C:\Users\User.julia\dev\Gtk\src\gtktypes.jl:17 [3] include at .\boot.jl:328 [inlined] [4] include_relative(::Module, ::String) at .\loading.jl:1105 [5] include at .\Base.jl:31 [inlined] [6] include(::String) at C:\Users\User.julia\dev\Gtk\src\Gtk.jl:2 [7] top-level scope at C:\Users\User.julia\dev\Gtk\src\Gtk.jl:53 [8] include at .\boot.jl:328 [inlined] [9] include_relative(::Module, ::String) at .\loading.jl:1105 [10] include(::Module, ::String) at .\Base.jl:31 [11] top-level scope at none:2 [12] eval at .\boot.jl:330 [inlined] [13] eval(::Expr) at .\client.jl:425 [14] top-level scope at .\none:3 in expression starting at C:\Users\User.julia\dev\Gtk\src\gtktypes.jl:117 in expression starting at C:\Users\User.julia\dev\Gtk\src\Gtk.jl:53 ERROR: Failed to precompile Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44] to C:\Users\User.julia\compiled\v1.3\Gtk\Vjnq0_6yYR4.ji. Stacktrace: [1] error(::String) at .\error.jl:33 [2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1283 [3] _require(::Base.PkgId) at .\loading.jl:1024 [4] require(::Base.PkgId) at .\loading.jl:922 [5] require(::Module, ::Symbol) at .\loading.jl:917

Is it supposed to work ? Maybe I should try with a clean install.

@tknopp

@giordano

WARNING: redefining constant libgdk
WARNING: redefining constant libgtk

doesn't sound right I think. Do you still have something in deps/?

Maybe I should try with a clean install.

That would make sure that you're not messing up with some leftover of previous installations

@tknopp

Current travis run looks ok despite x86 on windows.

@tknopp

@jonathanBieler: The JLL branch had an issue with existing deps/* files which were in the gitignore. Try switch to master where I have fixed this and make sure that there is no deps directory anymore.

This was referenced

Nov 29, 2019