Skip to content

Refactor filesystem event handler into a separate section#1190

Closed
philip-peterson wants to merge 2 commits intoa-h:mainfrom
philip-peterson:cleanup
Closed

Refactor filesystem event handler into a separate section#1190
philip-peterson wants to merge 2 commits intoa-h:mainfrom
philip-peterson:cleanup

Conversation

@philip-peterson
Copy link
Copy Markdown
Contributor

@philip-peterson philip-peterson commented Jun 12, 2025

Refactors the generatecmd::Run function into two functions, to reduce complexity. In doing so, I noticed that a few instances of error handling operate by defining a new variable err and logging and/or returning it immediately, while another instance assigns the preexisting symbol err which represents the return value. Because this logic was very unclear, I renamed the top-level err to proxyError (since it is only used for the proxy) and removed the named-return value so that any assignment to err must be its own contained definition to make for better readability.

The diff shows that StartProxy was changed (actually moved), but that is just due to the addition of a new function (and removal of part of another) which confuses the Git diff algorithm.

@a-h
Copy link
Copy Markdown
Owner

a-h commented Jul 24, 2025

I've done a major refactor in #1227 to hopefully make the intent of all that code a lot clearer.

Thanks a lot for your contribution here, it was the trigger to make me totally rethink the structure.

@a-h a-h closed this Jul 24, 2025
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.

2 participants