https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292010-09-07T23:14:20ZRedmineRedmine - Defect #6324: requires_redmine_plugin should defer loading plugins if not all dependencies are methttps://www.redmine.org/issues/6324?journal_id=200722010-09-07T23:14:20ZTim Felgentreff
<ul><li><strong>File</strong> <a href="/attachments/4441">0001-implement-redmine-plugin-loader.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4441/0001-implement-redmine-plugin-loader.patch">0001-implement-redmine-plugin-loader.patch</a> added</li><li><strong>Assignee</strong> set to <i>Eric Davis</i></li></ul><p>Remove debugger code</p> Redmine - Defect #6324: requires_redmine_plugin should defer loading plugins if not all dependencies are methttps://www.redmine.org/issues/6324?journal_id=200892010-09-08T09:29:01ZTim Felgentreff
<ul><li><strong>File</strong> <a href="/attachments/4443">0001-implement-redmine-plugin-loader.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4443/0001-implement-redmine-plugin-loader.patch">0001-implement-redmine-plugin-loader.patch</a> added</li></ul><p>Also, for some reason, the patch I posted doesn't apply with git am. So if you use that, here's one that does. (No code changes)</p> Redmine - Defect #6324: requires_redmine_plugin should defer loading plugins if not all dependencies are methttps://www.redmine.org/issues/6324?journal_id=200902010-09-08T09:54:39ZTim Felgentreff
<ul><li><strong>File</strong> <a href="/attachments/4444">0001-Add-a-Redmine-plugin-locator-to-be-able-to-query-the.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4444/0001-Add-a-Redmine-plugin-locator-to-be-able-to-query-the.patch">0001-Add-a-Redmine-plugin-locator-to-be-able-to-query-the.patch</a> added</li></ul><p>Just found a bug with my patch where the asset directory wasn't set properly. Changed it to not replace the rails plugin locator, but use Redmine's in addition to the default one. This probably nicer, anyway, in case people want to add locators themselves. In the new implementation, the Redmine plugin locator doesn't load anything, but is only for querying the Rails plugin search path.</p> Redmine - Defect #6324: requires_redmine_plugin should defer loading plugins if not all dependencies are methttps://www.redmine.org/issues/6324?journal_id=215962010-10-20T17:34:13ZEric Davis
<ul><li><strong>Target version</strong> set to <i>Unplanned backlogs</i></li></ul> Redmine - Defect #6324: requires_redmine_plugin should defer loading plugins if not all dependencies are methttps://www.redmine.org/issues/6324?journal_id=227432010-11-26T23:40:07ZEric Davis
<ul><li><strong>Assignee</strong> deleted (<del><i>Eric Davis</i></del>)</li></ul><p>I am stepping down from working on Redmine. If someone else is interesting in working on this issue, feel free to reassign it to them.</p>
<p>Eric Davis</p> Redmine - Defect #6324: requires_redmine_plugin should defer loading plugins if not all dependencies are methttps://www.redmine.org/issues/6324?journal_id=317772011-08-25T22:43:11ZToshi MARUYAMA
<ul></ul><p>FYI:<br /><a class="external" href="https://www.chiliproject.org/issues/256">https://www.chiliproject.org/issues/256</a></p> Redmine - Defect #6324: requires_redmine_plugin should defer loading plugins if not all dependencies are methttps://www.redmine.org/issues/6324?journal_id=544382014-01-22T12:14:45ZMassimo Rossello
<ul></ul><p>For anyone not willing to patch the core, not requiring an end user to manage his environment.rb, I found the following workaround to be prepended on the dependent plugin's init.rb:</p>
<blockquote>
<p>dep = File.join(Rails.root,'plugins','<plugin name>')<br />ActiveSupport::Dependencies.autoload_paths += [File.join(dep, 'lib')]<br />require_dependency File.join(dep, 'init')</p>
</blockquote> Redmine - Defect #6324: requires_redmine_plugin should defer loading plugins if not all dependencies are methttps://www.redmine.org/issues/6324?journal_id=580752014-08-14T11:08:35ZJean-Baptiste Barth
<ul><li><strong>File</strong> <a href="/attachments/12236">6324_defer_plugin_requirements_evaluation.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/12236/6324_defer_plugin_requirements_evaluation.patch">6324_defer_plugin_requirements_evaluation.patch</a> added</li><li><strong>Category</strong> set to <i>Plugin API</i></li><li><strong>Assignee</strong> set to <i>Jean-Baptiste Barth</i></li><li><strong>Target version</strong> changed from <i>Unplanned backlogs</i> to <i>Candidate for next major release</i></li></ul><p>Sorry to be late at the party, but I'd like this issue solved as it bothers me from time to time.</p>
<p>I find Tim's proposed implementation a bit complex (and the one integrated in chiliproject is even more complex) where all we'd have to do is defer the requirement check until the end of <code>Redmine::Plugin.load</code> method. Sure it's not as evolved but I think it should be enough.</p>
<p>Here's a proposed patch, I'd like to hear some opinions before committing it, and if you see obvious advantages to Tim's/Chiliproject's approach, let me know.</p> Redmine - Defect #6324: requires_redmine_plugin should defer loading plugins if not all dependencies are methttps://www.redmine.org/issues/6324?journal_id=582772014-08-26T13:57:01ZVincent Robert
<ul></ul><p>It seems to be the simplest fix, straight-forward and easy to understand. <br />The other implementations, much more complex, are error-prone processes in my opinion.</p> Redmine - Defect #6324: requires_redmine_plugin should defer loading plugins if not all dependencies are methttps://www.redmine.org/issues/6324?journal_id=690282016-02-03T17:36:44ZMichael Krupp
<ul><li><strong>File</strong> <a href="/attachments/15333">init.rb</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/15333/init.rb">init.rb</a> added</li><li><strong>File</strong> <a href="/attachments/15334">init.rb</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/15334/init.rb">init.rb</a> added</li></ul><p>As this issue seems to make no real progress in any direction, I implemented Jean-Baptiste's Patch as a plugin.<br />Just save them as <code>plugins/000_pluginloader/init.rb</code> and <code>plugins/zzz_pluginloader/init.rb</code>. done.</p> Redmine - Defect #6324: requires_redmine_plugin should defer loading plugins if not all dependencies are methttps://www.redmine.org/issues/6324?journal_id=717382016-06-22T21:41:48ZMischa The Evil
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-2 status-8 priority-4 priority-default" href="/issues/23131">Feature #23131</a>: Plugin load order defined by inter-plugin dependencies</i> added</li></ul> Redmine - Defect #6324: requires_redmine_plugin should defer loading plugins if not all dependencies are methttps://www.redmine.org/issues/6324?journal_id=736052016-09-19T02:25:07ZMichael Krupp
<ul></ul><p>Just a quick update: I merged the two plugin-files into one standalone plugin by abusing the <code>mirror_assets</code> method call in the redmine initializer. This plugin <strong>does not</strong> change the load order of plugins - it only defers the dependency check, as suggested in <a class="issue tracker-1 status-1 priority-4 priority-default" title="Defect: requires_redmine_plugin should defer loading plugins if not all dependencies are met (New)" href="https://www.redmine.org/issues/6324#note-8">#6324-8</a></p>
<p><a class="external" href="https://github.com/michaelkrupp/redmine_pluginloader">https://github.com/michaelkrupp/redmine_pluginloader</a></p> Redmine - Defect #6324: requires_redmine_plugin should defer loading plugins if not all dependencies are methttps://www.redmine.org/issues/6324?journal_id=882782018-11-06T07:34:11ZMassimo Rossello
<ul></ul><p>Following approach is simple and does work. Applied in my_plugin's init.rb to check a dependency dependency_plugin.<br />The check happens after all plugins have been registered.</p>
<pre>
Rails.configuration.to_prepare do
Redmine::Plugin.find(:my_plugin).requires_redmine_plugin :dependency_plugin, :version_or_higher => '1.0.0'
end
</pre> Redmine - Defect #6324: requires_redmine_plugin should defer loading plugins if not all dependencies are methttps://www.redmine.org/issues/6324?journal_id=1098412023-04-24T22:31:38ZTakashi Kato
<ul><li><strong>File</strong> <a href="/attachments/30368">0001-Defer-plugin-requirements-evaluation.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/30368/0001-Defer-plugin-requirements-evaluation.patch">0001-Defer-plugin-requirements-evaluation.patch</a> added</li></ul><p>A patch for version 5.0 or later is here.</p>