{"action":"created","issue":{"url":"https://api.github.com/repos/getnikola/nikola/issues/2836","repository_url":"https://api.github.com/repos/getnikola/nikola","labels_url":"https://api.github.com/repos/getnikola/nikola/issues/2836/labels{/name}","comments_url":"https://api.github.com/repos/getnikola/nikola/issues/2836/comments","events_url":"https://api.github.com/repos/getnikola/nikola/issues/2836/events","html_url":"https://github.com/getnikola/nikola/issues/2836","id":235341565,"number":2836,"title":"[discussion] Plugins","user":{"login":"felixfontein","id":5781356,"avatar_url":"https://avatars3.githubusercontent.com/u/5781356?v=3","gravatar_id":"","url":"https://api.github.com/users/felixfontein","html_url":"https://github.com/felixfontein","followers_url":"https://api.github.com/users/felixfontein/followers","following_url":"https://api.github.com/users/felixfontein/following{/other_user}","gists_url":"https://api.github.com/users/felixfontein/gists{/gist_id}","starred_url":"https://api.github.com/users/felixfontein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixfontein/subscriptions","organizations_url":"https://api.github.com/users/felixfontein/orgs","repos_url":"https://api.github.com/users/felixfontein/repos","events_url":"https://api.github.com/users/felixfontein/events{/privacy}","received_events_url":"https://api.github.com/users/felixfontein/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-12T19:32:36Z","updated_at":"2017-06-12T20:23:01Z","closed_at":null,"body":"I'd like to start a discussion on two plugin-related points:\r\n\r\n1. In #2820, @Kwpolska wrote \"built-in stuff should not be real yapsy plugins for performance reasons (that would require reading way too many files)\".\r\n\r\n2. Some of my internal plugins have strong dependencies (one must be there for the other to make sense and actually work), and they also share code, which is pretty hard to implement if I don't want to fix where they are loaded from; I need to use the `inspect` module to find their location on disk and use `importlib.machinery` (Python 3) resp. `imp` (Python 2) to load the other file, and of course I have to assume that all plugin files are in the same directory.\r\n\r\nI thought a bit about how to improve on this situation; here are two ideas:\r\n\r\na) Allow to inject plugins without yapsy. This could be done by Nikola core to add a bunch of plugins without the need to put them into own files (or even to define them in different files).\r\n\r\nb) Allow bundled plugins (a new plugin type like `CombinedPlugins`), which are one yapsy plugin and which provide several Nikola plugins from one source file (or one package).\r\n\r\nBoth ideas would share some code in `nikola.py`, and only differ in how they are seen from the point of the `DISABLED_PLUGINS` config and the `plugin` command plugin. (Idea a) plugins should be treated as different ones, idea b) plugins as one big plugin.)\r\n\r\nThis would allow to keep a loose coupling of plugins, like for #2820, without the need to have too many plugin files. What do you think?\r\n"},"comment":{"url":"https://api.github.com/repos/getnikola/nikola/issues/comments/307913053","html_url":"https://github.com/getnikola/nikola/issues/2836#issuecomment-307913053","issue_url":"https://api.github.com/repos/getnikola/nikola/issues/2836","id":307913053,"user":{"login":"felixfontein","id":5781356,"avatar_url":"https://avatars3.githubusercontent.com/u/5781356?v=3","gravatar_id":"","url":"https://api.github.com/users/felixfontein","html_url":"https://github.com/felixfontein","followers_url":"https://api.github.com/users/felixfontein/followers","following_url":"https://api.github.com/users/felixfontein/following{/other_user}","gists_url":"https://api.github.com/users/felixfontein/gists{/gist_id}","starred_url":"https://api.github.com/users/felixfontein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixfontein/subscriptions","organizations_url":"https://api.github.com/users/felixfontein/orgs","repos_url":"https://api.github.com/users/felixfontein/repos","events_url":"https://api.github.com/users/felixfontein/events{/privacy}","received_events_url":"https://api.github.com/users/felixfontein/received_events","type":"User","site_admin":false},"created_at":"2017-06-12T20:23:01Z","updated_at":"2017-06-12T20:23:01Z","body":"That's a possibility, too. I don't know any other and/or better system, though."}}
{"actor":{"display_login":"felixfontein"}}