Gtk.jl icon indicating copy to clipboard operation
Gtk.jl copied to clipboard

Add environment for generator scripts

Open Vexatos opened this issue 3 years ago • 3 comments

Minimal Project file for the generator scripts. See https://github.com/JuliaGraphics/Gtk.jl/pull/535#issuecomment-760067299.

From CI or tests, it'd be called like this:

using Gtk # latest Gtk from dev, imported in the main or test Gtk env
using Pkg
Pkg.activate("$root/gen")
Pkg.instantiate()
include("gtk_auto_gen.jl")

The generator scripts depend on the dev version of Gtk.jl, but actually making the environment depend on it isn't possible without including the Manifest.toml (using repo-url = ".."), which probably shouldn't be done.

Vexatos avatar Jan 14 '21 09:01 Vexatos

But aren't the tests run in dev mode? Not sure how this is accomplished in the test's project file

tknopp avatar Jan 14 '21 10:01 tknopp

Testing in julia using Pkg.test() is a kind of special environment, so yes, tests are run using Gtk from the directory, meaning if you were to run the generator script from inside the test environment (not that I'd recommend that) you'd get the correct output. Similarly, you can run it starting from the primary Project.toml in any CI step for the same effect. Gtk.jl doesn't have a separate Project.toml for the tests yet so I think it does that anyway.

Vexatos avatar Jan 14 '21 11:01 Vexatos

Codecov Report

Merging #555 (c128488) into master (8742856) will increase coverage by 0.08%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #555      +/-   ##
==========================================
+ Coverage   47.43%   47.52%   +0.08%     
==========================================
  Files          32       32              
  Lines        2382     2382              
==========================================
+ Hits         1130     1132       +2     
+ Misses       1252     1250       -2     
Impacted Files Coverage Δ
src/GLib/signals.jl 73.97% <0.00%> (+0.91%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8742856...c128488. Read the comment docs.

codecov[bot] avatar Jan 14 '21 11:01 codecov[bot]