プロジェクト

全般

プロフィール

Vote #73849

未完了

Reduce coupling between plugins and the "plugins/" directory

Admin Redmine さんがほぼ2年前に追加. ほぼ2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Plugin API_20
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
20
version_id:
23
issue_org_id:
13927
author_id:
1188
assigned_to_id:
1188
comments:
8
status_id:
1
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

Today plugins are just directories in @/plugins/@ directory. There are a few implicit assumptions in Redmine code that this is the case, which doesn't add much benefit I think. This reference is needed in the plugin discovery mechanism, but I can see obvious reasons why it may appear anywhere else.

It has at least one disadvantage: it prevents from easily distributing plugins as gems or via an other mechanism (which I think has a long list of advantages that I could enumerate an other day).

An other motivation is that removing this would lead to clearer code I think, we could remove some @Dir.glob@ and @File.xxx@ calls in favor of new, clear methods in @Redmine::Plugin@.

I'll try to work on that and link commit to this issue.


journals

The reason of moving "plugins" to "lib/plugins" is Rails3 prints deprecated warning.
See: r9533.
--------------------------------------------------------------------------------
Toshi MARUYAMA wrote:
> The reason of moving "plugins" to "lib/plugins" is Rails3 prints deprecated warning.
> See: r9533.

Sorry, I posted unrelated matters.

I think Redmine plugin mechanism problem is how to deal assets.
Current Redmine disables asset pipeline.
source:trunk/config/application.rb@11786#L46
--------------------------------------------------------------------------------
Actually that's one problem in Redmine plugins, but I have a few dozen others I could talk about. Re-enabling the asset pipeline can be done today in a standard Redmine plugin but it's a bit hacky and rough around the edges (see "this plugin":https://github.com/jbbarth/redmine_asset_pipeline for a proof-of-concept). I'll write about plugin concerns and some proposals in a blog post soon.
--------------------------------------------------------------------------------
Hi,

I added another issue a while back with a patch that extends this with the (at least in my opinion) missing support for migrations. -> #14402
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Jean-Baptiste Barth wrote:
> Actually that's one problem in Redmine plugins, ...

FYI, OpenProject (GPL3, Redmine fork) uses plugin gem.
https://github.com/opf/openproject/blob/v4.2.2/doc/DEVELOP_PLUGINS.md

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,14402,Plugin migration directory should use plugin directory
relates,Reopened,24007,Change plugins directory through the configuration.yml file
relates,Reopened,26139,Follow Gemfile's plugin loader as #24007

Admin Redmine さんがほぼ2年前に更新

  • カテゴリPlugin API_20 にセット
  • 対象バージョンUnplanned backlogs_23 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0