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

GtkLabel/GktEntry nullability checks #30

Closed
bilelmoussaoui opened this issue Oct 29, 2020 · 12 comments
Closed

GtkLabel/GktEntry nullability checks #30

bilelmoussaoui opened this issue Oct 29, 2020 · 12 comments
Labels

Comments

@bilelmoussaoui
Copy link
Member

Some functions can't return a nullable like GtkEntry::get_text(), we should check those and fix the Gir.toml accordingly.

@sdroege
Copy link
Member

sdroege commented Oct 29, 2020

See also gtk-rs/gir#970

@sdroege
Copy link
Member

sdroege commented Oct 29, 2020

Also there were various PRs to gtk3 to fix those. Before starting to work on this you probably want to go through the gtk3 PRs and sync whatever still makes sense :)

@sophie-h
Copy link
Contributor

sophie-h commented Nov 3, 2020

I'm planning to bring gtk4 into the state that we can 'trust' the upstream nullable annotations. (Very first fixes are merged.)

However, the current version of this repo is not build with the gir version that supports trusting the nullable annotations. Can someone maybe check the code after updating the git submodules?

@sdroege
Copy link
Member

sdroege commented Nov 3, 2020

Updating gir here should be fine and not cause any problems

@sophie-h
Copy link
Contributor

sophie-h commented Nov 3, 2020

@bilelmoussaoui GtkEntry::get_text() seems to be gone? But entry.get_buffer().get_text() should work without Options.

Will add a first PR after #31 is merged.

@bilelmoussaoui
Copy link
Member Author

@bilelmoussaoui GtkEntry::get_text() seems to be gone? But entry.get_buffer().get_text() should work without Options.

Will add a first PR after #31 is merged.

My bad, I should have checked the API before creating the issue. But you have got the idea, it's mostly to ensure we are okay null-ability checks wise.

@sdroege
Copy link
Member

sdroege commented Nov 4, 2020

However, the current version of this repo is not build with the gir version that supports trusting the nullable annotations.

That probably should wait until the gir-files are updated to GTK 3.99.3 or even newer as there are quite a few nullability fixes since the version we currently have.

@bilelmoussaoui
Copy link
Member Author

I will try to get #34 ready as soon as possible so we can update the bindings & move things forward

@sophie-h
Copy link
Contributor

sophie-h commented Nov 4, 2020

My gtk4 fixes are all post 3.99.3. So, newer would be good.

Afterwards I will mark for every object if it needs upstream fixing, has a committed upstream fix or add trust_return_value_nullability if the result is okay.

@bilelmoussaoui
Copy link
Member Author

@sophie-h the bindings were update to 3.99.3, feel free to submit your patches now 👍

@sophie-h
Copy link
Contributor

First fixes are in. I guess that's #68 now?

@sdroege
Copy link
Member

sdroege commented Nov 22, 2020

Yeah let's continue discussions there

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

No branches or pull requests

3 participants