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

glib: Deprecate main context channel #1231

Merged
merged 1 commit into from
Nov 25, 2023

Conversation

sdroege
Copy link
Member

@sdroege sdroege commented Nov 24, 2023

It was already removed in git master and giving an advance warning seems useful so people already port now if possible.

@sdroege
Copy link
Member Author

sdroege commented Nov 24, 2023

CI failures unrelated. clippy was updated once again 🙄

It was already removed in git master and giving an advance warning seems
useful so people already port now if possible.
@sdroege sdroege force-pushed the 0.18-deprecate-main-context-channel branch from 0ec6777 to 9a8b40f Compare November 24, 2023 08:52
@sdroege sdroege merged commit 93f6a02 into gtk-rs:0.18 Nov 25, 2023
33 of 46 checks passed
@sdroege sdroege deleted the 0.18-deprecate-main-context-channel branch November 25, 2023 08:50
@upsuper
Copy link

upsuper commented Dec 26, 2023

There are like 5 different crates that people could use. Not sure we want to prescribe one here.

I have to say I'm quite frustrated by this deprecation, as it is completely unclear what to do, and it took me quite a while to figure out.

It would probably be good to have some examples to show how the functionality can be achieved without this API, or at least mention relevant crates and API to use.

For anyone else finding finding this PR, I ended up using futures_channel's unbounded mpsc channel with MainContext::default().spawn_local to replace the use of MainContext::channel, which seems to work fine.

@sdroege
Copy link
Member Author

sdroege commented Dec 26, 2023

@upsuper Does #1242 help? If not, can you suggest an improvement for the deprecation message?

@upsuper
Copy link

upsuper commented Dec 26, 2023

Yes, that's way more helpful than the deprecation message here. It would probably be good to publish that change to crates.io sooner than later, so that others wouldn't have to struggle with figuring out it again.

@sdroege
Copy link
Member Author

sdroege commented Dec 26, 2023

I'll try getting a bugfix release out one of these days, yes. I think there was another useful bugfix too.

If you have any suggestions what else to improve with that message, now would be a good time :)

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

Successfully merging this pull request may close these issues.

3 participants