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

Check type of launch config #2125

Merged
merged 8 commits into from
Mar 27, 2024
Merged

Conversation

ealmloff
Copy link
Member

I ran into this issue a couple times while updating apps to the new launch builder API. The launch builder currently accepts any type and silently fails when you pass it the wrong type.

This can lead to situations where you pass in a config and see no errors, but your config is not applied.

This PR changes the launch builder to check the type of the config at compile type instead of using a boxed any type.

@ealmloff ealmloff added breaking This is a breaking change tweak Small changes to improve experience labels Mar 21, 2024
@ealmloff ealmloff marked this pull request as draft March 21, 2024 17:55
@srid

This comment was marked as off-topic.

@ealmloff ealmloff marked this pull request as ready for review March 25, 2024 17:25
@jkelleyrtp
Copy link
Member

Played around with it locally but not super happy with it since we still have the platform methods here that don't work with the config they specify. Will likely punt on it unless there's a quick fix to allow Builder::desktop().with_cfg()

@ealmloff
Copy link
Member Author

Played around with it locally but not super happy with it since we still have the platform methods here that don't work with the config they specify. Will likely punt on it unless there's a quick fix to allow Builder::desktop().with_cfg()

Builder::desktop().with_cfg()

now works even if you have the web feature enabled as well.

@ealmloff ealmloff force-pushed the make-config-typed branch from b9a2106 to 2a33e6c Compare March 27, 2024 15:41
@jkelleyrtp jkelleyrtp merged commit 86d1dba into DioxusLabs:main Mar 27, 2024
9 checks passed
@ealmloff ealmloff deleted the make-config-typed branch March 27, 2024 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This is a breaking change tweak Small changes to improve experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants