Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible problem in parents upcast generation #23

Closed
EPashkin opened this issue Jul 1, 2015 · 3 comments
Closed

Possible problem in parents upcast generation #23

EPashkin opened this issue Jul 1, 2015 · 3 comments

Comments

@EPashkin
Copy link
Member

EPashkin commented Jul 1, 2015

Some types (GtkCheckButton) have children and only constructors (no trait).
So for it's children ('GtkRadioButton') we better skip parent upcast.
We can just add empty trait or go hard way.

  • add boolean flah in analyze::object::Info
  • add cache for this in env::Env (or state)
  • then when processing parents, check cache for its Info (analyze if not found) and skip upcast.

Currently seen only GtkCheckButton, so empty trait IMHO will do.

@EPashkin
Copy link
Member Author

EPashkin commented Jul 1, 2015

Forgot to say about GtkScrollbar, and some others. Its have only deprecated children and can be correctly processed with analog of https://github.com/EPashkin/gir/tree/deprecation.
The latest use not too suitable for this module semver and because of this contains hacks.

@gkoz
Copy link
Member

gkoz commented Jul 1, 2015

Retaining consistency (not skipping over some classes in Upcast impls) seems worth having a few empty traits.

As to the classes with deprecated/useless subclasses, the analyzer might have to recompute the has_children property taking into account the set of widgets present in the toml. If the children aren't present in the config, it's as if there's no children.

@EPashkin
Copy link
Member Author

EPashkin commented Jul 1, 2015

Agree for counting only "listed" children.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants