Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Remove get for getters & properties where applicable #211

Merged
merged 5 commits into from Apr 13, 2021
Merged

Remove get for getters & properties where applicable #211

merged 5 commits into from Apr 13, 2021

Conversation

fengalin
Copy link
Contributor

@fengalin fengalin commented Dec 9, 2020

Note to application developers

Applications developers should use fix-getters-calls to ease migration of their applications. If you also wish to change your get functions definition to comply with the standards implemented here, use fix-getters-def.

Object

This is an attempt at fixing gtk-rs/gir#963.

Dependencies

The last repository is a pair of tools to automate manual code getters definitions and call sites update. Please take a look at the READMEs in this repo. They explain the assumptions and decisions I had to make to achieve this. Of course, these assumption are all subject to debate. The repository also provides a crate which implements getter renaming rules. See the discussion in the gir PR.

Content

This PR consists in the following commits with different reviewing needs:

  • I had to resolve conflicts in auto-generated code as a result of get prefixes removals. They can be found in this commit. I believe some of them might be subject to debate.
  • gir is updated in this commit. Nothing special here, discussion should occur in this PR.
  • The regen produces many changes in this commit, but those changes result from automatic rules. I did several iterations at the changes and at the functions which were kept unchanged, but it's most possible that I overlooked something. I think agreeing on the rules explained in fix-getters-rules and the changes to gir should cover most of the concerns though.
  • Manual code is automatically modified using the fix-getters tools in this commit. If we agree on what is described in the READMEs, I think we should be covered for this.
  • Final manual adjustments can be found in this commit. There are not many of them, so it shouldn't be a problem to review.

Base + a request

This is based on a snapshot of master and I will keep this as a basis until we reach the decision to merge this because it's quite time consuming to update. If / when we decide to merge, I would like that no branch be merged in neither gir nor gtk-rs until we get this merged completely.

I'll update gstreamer-rs when we come close to a merge decision.

@fengalin
Copy link
Contributor Author

fengalin commented Dec 9, 2020

Requires some manual changes I didn't catch yet...

@fengalin
Copy link
Contributor Author

Thought I should clarify: this is WIP in the sense that it can't be merged as is because:

  • It depends on other projects changes / release (see initial comment).
  • I wish we would discuss the premises on which I based these changes and fix-getters in particular.

Other than that, it's ready :)

@fengalin fengalin changed the title WIP: remove get for getters & properties where applicable Remove get for getters & properties where applicable Jan 16, 2021
@sdroege sdroege added this to the 0.14.0 milestone Mar 30, 2021
gio/Gir.toml Outdated Show resolved Hide resolved
gio/Gir.toml Show resolved Hide resolved
glib/src/variant.rs Outdated Show resolved Hide resolved
glib/src/object.rs Outdated Show resolved Hide resolved
Copy link
Member

@sdroege sdroege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all good to me otherwise. Thanks :)

@GuillaumeGomez GuillaumeGomez merged commit 3b154eb into gtk-rs:master Apr 13, 2021
@fengalin fengalin deleted the remove-get_-for-getters branch April 13, 2021 16:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants