Skip to content

Fix server mode live reload for C files#1647

Merged
st0012 merged 1 commit intomasterfrom
fix-c-file-parsing-issue-in-server-mode
Mar 16, 2026
Merged

Fix server mode live reload for C files#1647
st0012 merged 1 commit intomasterfrom
fix-c-file-parsing-issue-in-server-mode

Conversation

@st0012
Copy link
Member

@st0012 st0012 commented Mar 15, 2026

Summary

  • The C parser didn't call add_to_classes_or_modules when creating classes/modules, so clear_file_contributions couldn't clean up old entries during server mode re-parse — causing duplicate methods when editing C files with live reload.
  • Add the call in both find_class and handle_class_module, matching what the Ruby parsers already do.

The C parser didn't call `add_to_classes_or_modules` when creating
classes/modules, so `clear_file_contributions` couldn't clean up old
entries during server mode re-parse. This caused duplicate methods
when editing C files with live reload.

Add the call in both `find_class` and `handle_class_module`, matching
what the Ruby parsers already do.
@st0012 st0012 self-assigned this Mar 15, 2026
@st0012 st0012 added the bug label Mar 15, 2026
@matzbot
Copy link
Collaborator

matzbot commented Mar 15, 2026

🚀 Preview deployment available at: https://9c73c44b.rdoc-6cd.pages.dev (commit: 1da15f9)

@st0012 st0012 marked this pull request as ready for review March 15, 2026 23:40
@st0012 st0012 merged commit 78325e1 into master Mar 16, 2026
78 checks passed
@st0012 st0012 deleted the fix-c-file-parsing-issue-in-server-mode branch March 16, 2026 12:33
@st0012
Copy link
Member Author

st0012 commented Mar 16, 2026

Ah...I was trying to merge #1648 but clicked the merge button in the wrong tab 🤦‍♂️
Please still leave comments and I'll address them in separate PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants