I think people who are afraid of patch files simply have not seen them in proper presentation.
A patch with colored additions/removals, configurable amount of context, line numbers and ability to view new and old version of the file is very readable.
If you, the person reading this, consider patch files unreadable I suggest reading some diffs in trac.
MOD Installation
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.
If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.
If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Re: MOD Installation
While I agree that MODX is ugly, there are several tools that are evolving. MODX generator allows easy creation of instructions, MODX creator/editor are great apps to add meta data. By making the automod functionality cli-friendly applying MODs can become almost as easy as applying a patch.code reader wrote:MODx is proprietary (and ugly) format, that is meant to be used by humans, and is not friendly. it is ridiculously difficult to create, and not at all friendly to apply.
- imkingdavid
- Registered User
- Posts: 1050
- Joined: Thu Jul 30, 2009 12:06 pm
Re: MOD Installation
I don't mind having it in separate files for clarity and such, I just think that having to first apply all the code changes with one program and then apply the sql with another is too much. Personally it isn't too big of a deal, but I think that the majority of admins would appreciate a more single-step approach. So if it is split into multiple files I think that the other file should still be run by AutoMOD to decrease the amount of steps required.eviL3 wrote:I'd prefer to see these kind of actions in a separate file instead of mixing file changes and db changes.
As for patch vs. MODx, I have very little (if any) experience with patches. I use a repository for version control for my personal projects, but I have never had to apply or use a patch. So forgive me if I'm a little biased in favor of MODx instead of having to learn yet another way of doing things.
Re: MOD Installation
You realize of course that patches are universally useful while modx is phpbb (version) specific, right?
Even if patch can't express inline finds, at the moment of installation automod locates the lines it's going to modify and alter them. If in fact modx inline finds cannot be translated to patch hunks using modx information only, then patch generation is actually domain of automod as opposed to modx tools contrary to what was stated earlier.
With modx vs patch, the point is that either modx tools or automod are very close to generating patches because they either do the edits or look at the edits. I think adding patch output has to be relatively easy compared to everything else automod does.
The value in working with patches is in lowering the barrier of entry to mods. There are many requests for mods on the main board, and there are many developers capable of writing said mods. One of the issues with developing a mod is writing modx which is a manual process and could well take more time than actually coding the mod. So more efficient developers for whom this is even more true shy away from writing mods for other people. I know one developer for whom this is true.
Even if patch can't express inline finds, at the moment of installation automod locates the lines it's going to modify and alter them. If in fact modx inline finds cannot be translated to patch hunks using modx information only, then patch generation is actually domain of automod as opposed to modx tools contrary to what was stated earlier.
With modx vs patch, the point is that either modx tools or automod are very close to generating patches because they either do the edits or look at the edits. I think adding patch output has to be relatively easy compared to everything else automod does.
The value in working with patches is in lowering the barrier of entry to mods. There are many requests for mods on the main board, and there are many developers capable of writing said mods. One of the issues with developing a mod is writing modx which is a manual process and could well take more time than actually coding the mod. So more efficient developers for whom this is even more true shy away from writing mods for other people. I know one developer for whom this is true.
- imkingdavid
- Registered User
- Posts: 1050
- Joined: Thu Jul 30, 2009 12:06 pm
Re: MOD Installation
I do agree with the time consuming nature of MODx, although there are tools to help speed up the process. One of the things I dislike most about releasing new versions is having to not only provide updated installation instructions but also provide update instructions. Using a diff could make this process even faster.
I guess a "generate diff" feature inside AutoMOD would be helpful and should be considered, even if AutoMOD does not end up supporting the use of patches to apply the MOD with AutoMOD.
I guess a "generate diff" feature inside AutoMOD would be helpful and should be considered, even if AutoMOD does not end up supporting the use of patches to apply the MOD with AutoMOD.
- DavidIQ
- Customisations Team Leader
- Posts: 1904
- Joined: Thu Mar 02, 2006 4:29 pm
- Location: Earth
- Contact:
Re: MOD Installation
We're talking about phpBB here so I don't see how patches being universal has any relevance. MODX has been around for over 2 years now so it could be argued that for phpBB, MODX is universal now since all MODs use it. If the point here is that it would be nice to generate a diff file instead of MODX or in conjunction with MODX and have the MOD installer handle that then that might be something to look into.nn- wrote:You realize of course that patches are universally useful while modx is phpbb (version) specific, right?
- A_Jelly_Doughnut
- Registered User
- Posts: 1780
- Joined: Wed Jun 04, 2003 4:23 pm
Re: MOD Installation
Yes, yes, and yes.eviL3 wrote:IMO the code base of AutoMOD needs to be cleaned up. There needs to be better separation of concerns, less dependencies between the components. The MODX parser should use SimpleXML and XPath. There should be an API that can be used to install MODs programatically without having to load the whole phpBB environment with $template, trigger_error, etc.
Dependency injection is an interesting idea, especially for things like the $db and $user objects...Since this is a new addition to phpBB, there's a lot you can do with it. You can use dependency injection (passing information into classes instead of depending on globals).
Another reasonable idea.You can use Exceptions instead of trigger_error, which means you don't have to worry that trigger_error will mess up your CLI output.
Before I could fully comment, I'd need more information on what exactly will be implemented as this "storage abstraction."The file writing API is frankly a bit of a mess. Since there is a proper storage abstraction planned for 3.1, it may be possible to use that too for FTP, SFTP, etc.
First I've heard about this. Someone care to elaborate?There has already been some work on a CLI for 3.1
====================
I'm not seeing the broad applicability of a feature like this.nn' wrote:I would like a facility to convert modx files to patch files and sql files.
====================
Git is irrelevant, because it provides nothing (with regards to creating diffs) that could not be done with SVN or even CVS.code reader wrote:recently we switched to git. it is very reasonable to assume that every MOD developer has a full repo of the code.
====================
This has been the default view for patches in web interfaces for years, and while its nicer than the pure .diff file, it is still not intended for human application. This is a stated goal of phpBB for the forseeable future. Furthermore, I don't think anyone has the will to force another completely new format on MOD authors. (And for what its worth, I would argue not all MOD authors, probably not even a majority, are familiar with patches, so it would be new to them)nn- wrote: A patch with colored additions/removals, configurable amount of context, line numbers and ability to view new and old version of the file is very readable.
If you, the person reading this, consider patch files unreadable I suggest reading some diffs in trac.
===================
In principle, I agree.imkingdavid wrote:I just think that having to first apply all the code changes with one program and then apply the sql with another is too much. Personally it isn't too big of a deal, but I think that the majority of admins would appreciate a more single-step approach. So if it is split into multiple files I think that the other file should still be run by AutoMOD to decrease the amount of steps required.
=================
I don't think I follow the logic. What does patch generation have to do with installing a MOD?nn- wrote: Even if patch can't express inline finds, at the moment of installation automod locates the lines it's going to modify and alter them. If in fact modx inline finds cannot be translated to patch hunks using modx information only, then patch generation is actually domain of automod as opposed to modx tools contrary to what was stated earlier.
A_Jelly_Doughnut
Re: MOD Installation
Well, you can always create a wrapper program that runs both, so it's really a non-issue. And yes, I agree that installing a MOD in one step must be possible.imkingdavid wrote:I don't mind having it in separate files for clarity and such, I just think that having to first apply all the code changes with one program and then apply the sql with another is too much.
Re: MOD Installation
Henry mentioned it would be similar to cache. I guess would be something like a watered down filesystem. So you have ability to write resource, read resource, check if resource exists. Perhaps even list items and have namespacing (eg. directories). And also provide a public link in case of avatars, attachments.A_Jelly_Doughnut wrote:Before I could fully comment, I'd need more information on what exactly will be implemented as this "storage abstraction."
It's something Cullen (formerly Brainy) started working on. I haven't seen any posts about it, I just came across the branch on github.A_Jelly_Doughnut wrote:First I've heard about this (phpBB 3.1 CLI). Someone care to elaborate?
Re: MOD Installation
That part was purely meant for user uploaded files. Not sure how this relates?eviL3 wrote:Henry mentioned it would be similar to cache. I guess would be something like a watered down filesystem. So you have ability to write resource, read resource, check if resource exists. Perhaps even list items and have namespacing (eg. directories). And also provide a public link in case of avatars, attachments.A_Jelly_Doughnut wrote:Before I could fully comment, I'd need more information on what exactly will be implemented as this "storage abstraction."