Skip to content

Refactor refine to accomodate maintainers preferences#1272

Merged
SteffenL merged 21 commits into
webview:masterfrom
citkane:refactor-dispatch_size_default
Mar 27, 2025
Merged

Refactor refine to accomodate maintainers preferences#1272
SteffenL merged 21 commits into
webview:masterfrom
citkane:refactor-dispatch_size_default

Conversation

@citkane

@citkane citkane commented Mar 24, 2025

Copy link
Copy Markdown
Contributor

With relation to:

@SteffenL This is a draft PR to keep track of the code style and preferences we have been discussing.

The diffs here will become a lot less noisy as the above mentioned PR's are merged.
CI is expected to fail until then.

@citkane citkane marked this pull request as ready for review March 26, 2025 17:22
@citkane

citkane commented Mar 26, 2025

Copy link
Copy Markdown
Contributor Author

Linux is not liking something about the virtual window_init and window_settings. Was all good on my local...
Looking into it.

@citkane

citkane commented Mar 26, 2025

Copy link
Copy Markdown
Contributor Author

Calling virtual methods from a class constructor looks like grey and complex territory.

I have reverted back to non-virtual methods - we should just keep in mind not to diverge the constructor functions across backends.

@citkane

citkane commented Mar 26, 2025

Copy link
Copy Markdown
Contributor Author

@SteffenL could you nudge the two timed-out Windows tests

@SteffenL

SteffenL commented Mar 26, 2025

Copy link
Copy Markdown
Collaborator

Done.

As for calling virtual methods from a constructor:

As long as it's called from the derived class then I don't believe it's that bad. If someone were to derive from that class again and also override the same methods then that would be more concerning.

Since we know hopefully know what we're doing then in my opinion that's just fine, but I'm aware Clang will emit a warning as I discovered myself the other day... We should eliminate warnings, but sometimes it can make sense to suppress them if possible.

@SteffenL

SteffenL commented Mar 26, 2025

Copy link
Copy Markdown
Collaborator

I wonder if the warning will disappear if we make the derived class final so that nobody can derive from it. We currently derive from it in tests, and for now need it to not be final, but I don't think it makes much sense to let others derive from it.

@citkane

citkane commented Mar 26, 2025

Copy link
Copy Markdown
Contributor Author

I am happy to let go of the derived constructor methods in this PR as it's primary purpose is to tidy up your refactoring requirements, which it does.

@SteffenL SteffenL merged commit 615a72c into webview:master Mar 27, 2025
@citkane citkane deleted the refactor-dispatch_size_default branch March 27, 2025 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants