`Granite.Widgets.TimePicker.input' is incompatible with base method `Gtk.SpinButton.input'

Bug #977378 reported by Pim Vullers on 2012-04-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Granite
Fix Released
High
Mario Guerriero

Bug Description

When trying to build scratch I get the following error, which points to an error in the Granite vapi:

[ 2%] Scanning dependencies of target i18n
Generating main.c, SearchManager.c, SourceView.c, Settings.c, PluginManager.c, TemplateManager.c, scratchcore.vapi, scratchcore.h, scratchcore_internal.h
[ 5%] messages.”
[ 5%] Built target i18n
granite.vapi:229.4-229.31: error: overriding method `Granite.Widgets.TimePicker.input' is incompatible with base method `Gtk.SpinButton.input': incompatible type of parameter 1.
   protected override int input (out double new_value);
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
granite.vapi:229.4-229.31: error: Granite.Widgets.TimePicker.input: no suitable method found to override
   protected override int input (out double new_value);
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/tmp/portage/app-editors/scratch-9999/work/scratch-9999/scratchcore/TemplateManager.vala:76.26-76.110: warning: unhandled error `GLib.Error'
        var enumerator = origin.enumerate_children ("standard::type,standard::name,standard::content-type", 0);
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/tmp/portage/app-editors/scratch-9999/work/scratch-9999/scratchcore/TemplateManager.vala:78.25-78.47: warning: unhandled error `GLib.Error'
        var file_info = enumerator.next_file ();
                        ^^^^^^^^^^^^^^^^^^^^^^^
/var/tmp/portage/app-editors/scratch-9999/work/scratch-9999/scratchcore/TemplateManager.vala:86.25-86.47: warning: unhandled error `GLib.Error'
            file_info = enumerator.next_file ();
                        ^^^^^^^^^^^^^^^^^^^^^^^
/var/tmp/portage/app-editors/scratch-9999/work/scratch-9999/scratchcore/TemplateManager.vala:44.9-44.37: warning: unhandled error `GLib.Error'
        destination.make_directory ();
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/tmp/portage/app-editors/scratch-9999/work/scratch-9999/scratchcore/TemplateManager.vala:52.17-52.112: warning: unhandled error `GLib.FileError'
                FileUtils.get_contents (Path.build_filename (origin.get_path (), file.get_name ()), out content);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/tmp/portage/app-editors/scratch-9999/work/scratch-9999/scratchcore/TemplateManager.vala:58.17-58.113: warning: unhandled error `GLib.FileError'
                FileUtils.set_contents (Path.build_filename (destination.get_path (), file.get_name ()), content);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/tmp/portage/app-editors/scratch-9999/work/scratch-9999/scratchcore/TemplateManager.vala:63.17-63.35: warning: unhandled error `GLib.Error'
                orig.copy (dest, 0);
                ^^^^^^^^^^^^^^^^^^^
/var/tmp/portage/app-editors/scratch-9999/work/scratch-9999/scratchcore/SearchManager.vala:448.9-448.72: warning: unhandled error `GLib.Error'
        css.load_from_data("* { padding-left:0; padding-right:0; }", -1);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/tmp/portage/app-editors/scratch-9999/work/scratch-9999/scratchcore/SearchManager.vala:458.5-458.25: warning: Granite.Widgets.ToolArrow.set_state hides inherited method `Gtk.Widget.set_state'. Use the `new' keyword if hiding was intentional
    public void set_state(bool v)
    ^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 2 error(s), 9 warning(s)
make[2]: *** [scratchcore/main.c] Error 1
make[1]: *** [scratchcore/CMakeFiles/scratchcore.dir/all] Error 2
make: *** [all] Error 2

Related branches

Pim Vullers (pimvullers) wrote :

Related scratch bug #952316.

Looks like the VAPI is borked. Getting the same when building Webcontracts.

Changed in granite:
status: New → Confirmed
importance: Undecided → High

Ah, it's because I've been using Vala 0.14 instead of 0.16

So, my bad, not Granite's fault.

Mario Guerriero (mefrio-g) wrote :

Also with valac-0.16 there's this problem. dexter-contacts's builds fails for this problem

Mario Guerriero (mefrio-g) wrote :

Can't we remove the function input? It will be however available via SpinButton's input signal:
http://valadoc.org/#!api=gtk+-3.0/Gtk.SpinButton.input

It's really important to fix this bug or scratch and dexter-contacts will not be built anymore

Mario Guerriero (mefrio-g) wrote :

I pushed a fix following the suggestion of Cody Garver. Waiting for a review

Changed in granite:
assignee: nobody → Mario Guerriero (mefrio-g)
Cody Garver (codygarver) on 2012-05-14
Changed in granite:
status: Confirmed → Fix Committed
Daniel Fore (danrabbit) on 2012-05-22
Changed in granite:
milestone: none → 0.1.1
Changed in granite:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers