Giter Club home page Giter Club logo

Comments (17)

EPashkin avatar EPashkin commented on July 20, 2024

You use feature v2_40 ?

from gio.

sdroege avatar sdroege commented on July 20, 2024

--all-features actually (to make sure none of my features are conflicting with each other and they all always compile). It happens when using gio with features = ["v2_38"] or earlier. v2_40 works fine as that will pull in the same feature from gio-sys.

The problem here is that the whole type is v2_40, but only its impl part is hidden behind that. The glib_wrapper! macro is not.

from gio.

GuillaumeGomez avatar GuillaumeGomez commented on July 20, 2024

You're never supposed to run --all-features. Maybe we should add a check to see if more than one version feature is enabled at once to make the compilation fail (we now have a compilation_fail!` macro so wy not using it?).

from gio.

sdroege avatar sdroege commented on July 20, 2024

Why make something fail that generally works unless you break things?

Also again, this breaks also if you just enable a pre-2.40 feature on gio. This does not need --all-features to fail.

from gio.

EPashkin avatar EPashkin commented on July 20, 2024

@sdroege Gio.SettingsSchemaKey don't have version in Gio-2.0.gir file,
so gir try detect it automatically by function, and some of function (g_settings_schema_key_get_description) have "2.34".
Can you try set version in config and check failure again.
Fix can be included in regen with gtk-rs/gir#498

from gio.

sdroege avatar sdroege commented on July 20, 2024

You mean

[[object]]
name = "Gio.SettingsSchemaKey"
status = "generate"
version = "2.40"

That has no effect

from gio.

EPashkin avatar EPashkin commented on July 20, 2024

Strange.
It don't change generated code?
cargo build --all-features on fixed gio works fine for me.
cargo build --features="v2_34" too.

from gio.

sdroege avatar sdroege commented on July 20, 2024

How does "fixed gio" look like? And yes, inside gio I also can't get it to fail for whatever reason. But create an empty new project with this in the Cargo.toml and it will fail: gio = { git = "https://github.com/gtk-rs/gio", features = ["v2_38"] }

from gio.

EPashkin avatar EPashkin commented on July 20, 2024

Key changes is

diff --git a/src/auto/mod.rs b/src/auto/mod.rs
index 8f4df03..fdf691c 100644
--- a/src/auto/mod.rs
+++ b/src/auto/mod.rs
@@ -1,4 +1,4 @@
-// This file was generated by gir (d50d839) from gir-files (469db10)
+// This file was generated by gir (83cd11e+) from gir-files (469db10)
 // DO NOT EDIT
 
 mod action;
@@ -101,9 +101,9 @@ pub use self::resource::Resource;
 mod settings_schema;
 pub use self::settings_schema::SettingsSchema;
 
-#[cfg(any(feature = "v2_34", feature = "dox"))]
+#[cfg(any(feature = "v2_40", feature = "dox"))]
 mod settings_schema_key;
-#[cfg(any(feature = "v2_34", feature = "dox"))]
+#[cfg(any(feature = "v2_40", feature = "dox"))]
 pub use self::settings_schema_key::SettingsSchemaKey;

Empty project with "v2_38" also builds fine for me.

from gio.

sdroege avatar sdroege commented on July 20, 2024

Yes that change would work

from gio.

EPashkin avatar EPashkin commented on July 20, 2024

Strange that you don't get it generated by #67 (comment)

from gio.

sdroege avatar sdroege commented on July 20, 2024

Well, let's merge this then and make my travis green again? :)

from gio.

EPashkin avatar EPashkin commented on July 20, 2024

This? I don't see any PR for gio.

from gio.

sdroege avatar sdroege commented on July 20, 2024

I thought you submitted one :)

from gio.

EPashkin avatar EPashkin commented on July 20, 2024

No, I still waiting your PR's with gtk-rs/gir#498.
so I though that you can add this change to gio's.

from gio.

sdroege avatar sdroege commented on July 20, 2024

Not really important to do regens for that one, and as I wrote above the change in the .toml file does not work for me while it does for you. I must be adding something wrong to the .toml file.

from gio.

EPashkin avatar EPashkin commented on July 20, 2024

IMHO any update that change many files in many crates better applied fast to simplify check future updates.
#67 (comment) is look right change for me,
may be you forgot to remove "Gio.SettingsSchemaKey" from generate array and gir just don't do anything.

from gio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.