Skip to content

fix plugins bug#38

Open
git88997 wants to merge 5 commits intoAutumn-27:mainfrom
git88997:main
Open

fix plugins bug#38
git88997 wants to merge 5 commits intoAutumn-27:mainfrom
git88997:main

Conversation

@git88997
Copy link
Copy Markdown

Fix GetPlugin: deadlock, wrong filepath, and missing lazy load

Copilot AI and others added 5 commits February 22, 2026 16:57
…known modules

Three bugs fixed in GetPlugin():
1. Deadlock: defer RUnlock() kept read lock held when RegisterPlugin()
   tried to acquire write lock. Fix: manual RLock/RUnlock management.
2. Wrong filepath: filepath.Join(dir, module, id, ".go") produced
   "dir/module/id/.go" instead of "dir/module/id.go". Fix: use
   fmt.Sprintf("%v.go", id).
3. Missing lazy load: when module key didn't exist in the plugins map,
   lazy loading was never attempted. Fix: move lazy loading outside
   the module existence check.

Co-authored-by: git88997 <247747451+git88997@users.noreply.github.com>
…known modules

Co-authored-by: git88997 <247747451+git88997@users.noreply.github.com>
Co-authored-by: git88997 <247747451+git88997@users.noreply.github.com>
Fix GetPlugin: deadlock, wrong filepath, and missing lazy load
@git88997
Copy link
Copy Markdown
Author

fix
Autumn-27/ScopeSentry#314

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