sarim / ibus-avro

Avro phonetic bangla typing layout for ibus
Mozilla Public License 2.0
240 stars 92 forks source link

ibus-avro golang build errors #172

Closed abdullah-if closed 3 years ago

abdullah-if commented 3 years ago

While building ibus-avro (golang branch) throw warning for every set method declared for Gtkchild in gmain.vala and say. Build is successful after slight modification, thought still throw must be declered as `unowned' warnings. Run on a par with JS version, I have no idea how that happened but stuff works. Are the errors normal or its just me ?

../gmain.vala:4.2-4.33: warning: [GtkChild] properties must be declared as `unowned'
        public Gtk.Switch toggle_preview { get; set; }
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../gmain.vala:7.2-7.30: warning: [GtkChild] properties must be declared as `unowned'
        public Gtk.Switch toggle_dict { get; set; }
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../gmain.vala:10.2-10.33: warning: [GtkChild] properties must be declared as `unowned'
        public Gtk.Switch toggle_newline { get; set; }
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../gmain.vala:13.2-13.36: warning: [GtkChild] properties must be declared as `unowned'
        public Gtk.Scale scale_lutable_size { get; set; }
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../gmain.vala:16.2-16.42: warning: [GtkChild] properties must be declared as `unowned'
        public Gtk.Adjustment adjust_lutable_size { get; set; }
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../gmain.vala:19.2-19.54: warning: [GtkChild] properties must be declared as `unowned'
        public Gtk.ComboBoxText selection_lutable_orientation { get; set; }
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../gmain.vala:4.42-4.45: warning: [GtkChild] property `AvroPrefWindow.toggle_preview' is not allowed to have `set' accessor
        public Gtk.Switch toggle_preview { get; set; }
                                                ^^^^
../gmain.vala:4.42-4.45: error: Assignment of [GtkChild] `AvroPrefWindow._toggle_preview' is not allowed
        public Gtk.Switch toggle_preview { get; set; }
                                                ^^^^
../gmain.vala:7.39-7.42: warning: [GtkChild] property `AvroPrefWindow.toggle_dict' is not allowed to have `set' accessor
        public Gtk.Switch toggle_dict { get; set; }
                                             ^^^^
../gmain.vala:7.39-7.42: error: Assignment of [GtkChild] `AvroPrefWindow._toggle_dict' is not allowed
        public Gtk.Switch toggle_dict { get; set; }
                                             ^^^^
../gmain.vala:10.42-10.45: warning: [GtkChild] property `AvroPrefWindow.toggle_newline' is not allowed to have `set' accessor
        public Gtk.Switch toggle_newline { get; set; }
                                                ^^^^
../gmain.vala:10.42-10.45: error: Assignment of [GtkChild] `AvroPrefWindow._toggle_newline' is not allowed
        public Gtk.Switch toggle_newline { get; set; }
                                                ^^^^
../gmain.vala:16.51-16.54: warning: [GtkChild] property `AvroPrefWindow.adjust_lutable_size' is not allowed to have `set' accessor
        public Gtk.Adjustment adjust_lutable_size { get; set; }
                                                         ^^^^
../gmain.vala:16.51-16.54: error: Assignment of [GtkChild] `AvroPrefWindow._adjust_lutable_size' is not allowed
        public Gtk.Adjustment adjust_lutable_size { get; set; }
                                                         ^^^^
../gmain.vala:19.63-19.66: warning: [GtkChild] property `AvroPrefWindow.selection_lutable_orientation' is not allowed to have `set' accessor
        public Gtk.ComboBoxText selection_lutable_orientation { get; set; }
                                                                     ^^^^
../gmain.vala:19.63-19.66: error: Assignment of [GtkChild] `AvroPrefWindow._selection_lutable_orientation' is not allowed
        public Gtk.ComboBoxText selection_lutable_orientation { get; set; }
                                                                     ^^^^
../gmain.vala:13.45-13.48: warning: [GtkChild] property `AvroPrefWindow.scale_lutable_size' is not allowed to have `set' accessor
        public Gtk.Scale scale_lutable_size { get; set; }
                                                   ^^^^
../gmain.vala:13.45-13.48: error: Assignment of [GtkChild] `AvroPrefWindow._scale_lutable_size' is not allowed
        public Gtk.Scale scale_lutable_size { get; set; }
                                                   ^^^^

Dependency:

Vala: 0.52.2
Meson: 0.57.2
Go: 1.16.3 linux/amd64
Ninja: 1.10.2

Or whatever is the latest in Manjaro Testing

P.S.: Currently using the golang build, no problem seen so far.

sarim commented 3 years ago

That part of the code (vala) is for setting the preferences, without it the main engine will still work but with default settings. There shouldn't be any error if you compile using Vala 48, its the version ubuntu LTS uses.

the Go branch is still very much WIP. Thank you very much for your feedback, but as its an unreleased version, I'm going to close this issue :)

abdullah-if commented 3 years ago

I am aware of the purpose of get and set methods, but the interesting fact is, it can still work and compile fine if the set methods are removed. You can check this commit and it can read the config fine, just get it. Can send a screen-cast.

Thanks for the fast review.