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

Module names must match file/class names for plugins to work from compiled binary #165

Open
hinerm opened this issue Oct 7, 2022 · 0 comments

Comments

@hinerm
Copy link
Contributor

hinerm commented Oct 7, 2022

These three elements must all match for a plugin module to be discovered:

  • File name
  • Class name
  • Declared module_name

image

It seems that these items can be different when building CP from source. But the modules will not be created correctly (they complain about not being able to find core CP imports, e.g. CP-core Module).

To reproduce:

  1. Create a simple module with these 3 elements not matching (it was sufficient to add an underscore _ to the file name, but be otherwise equal)
  2. Build CP from source
  3. Run CP and point it at the CP-plugins directory with aforementioned module
  4. Restart and run CP > plugin should be discovered ok
  5. Install a binary CP distribution
  6. run CP from the binary > plugin is not discovered (they reuse the same configured plugins directory)

Suspect line of code is here in CP-core plugins.py.

Tested on Windows with case-insensitive files. Didn't test on case-sensitive OS, e.g. on Mac.

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

No branches or pull requests

1 participant