Page MenuHomePhabricator

Get name and record-time of all modules to better manage their versions
Closed, InvalidPublic

Description

In many modules using sub-modules it is hard to manage their versions without errors, even when they are renamed or copied in other versions.

This task is to reduce errors in the versions management process described below.

The Module:Central can support any other to manage versions of its sub-modules.
See its documentation and central modules T135845

For the versions management, each module can have a header like :
p.versions = { -- Modules dependencies. Dependencias del módulo. Dépendances du module.
versionName = "Author3", versionNumber = "3.03", versionDate = "2016-04-18 23:41",
sought = " Author3, Mathroman2 , Central ", -- sought sub-modules versions
known = " Author3 * Mathroman, Mathroman2 * Central, Central.03 ", -- known sub-modules versions
}

With the support of the Module:Central, the main module can display a report of the versions management. See "Bureau d'aide" and "Test de la gestion des versions des modules". In some or many languages.

  • But now, this needs that all versions headers was well updated manualy by developpers, even when they rename modules or duplicate them in new versions. The only module name available is for the main by frame:getTitle()
  • Then actual name and time of all modules could help to reduce errors in the versions management.

Event Timeline

Rical raised the priority of this task from to Medium.
Rical updated the task description. (Show Details)
Rical added a project: Scribunto.

For relatively-named submodules, do this:

local submodule = require(mw.getCurrentFrame():getTitle() .. '/submodule')

For versioning, either keep a version constant in the code, or use frame:callParserFunction with REVISIONTIMESTAMP. For ISO 8601 dates, call mw.getContentLanguage():formatDate('c', theDate).

This run fine, thanks:
module = pcall_module( title ) -- require() must not fail and block the page.
if module and title then revistamp = frame:preprocess( "{{REVISIONTIMESTAMP:" .. title .. "}}" ) end
if module and title then
revistime = CA.str_vars("%1-%2-%3#%4.%5", string.sub(revistamp,1,4), string.sub(revistamp,5,6), string.sub(revistamp,7,8), string.sub(revistamp,-6,-5), string.sub(revistamp,-4,-3) )

Are there any features that you still need then, or can this be closed? Also, I encourage you to use callParserFunction rather than preprocess.

As a ponctual help this task is no more needed.

But it could become a blocking task as a part of the implementation of the central module definition in T121470#1880317 Investigation: Central Global Repository for Templates, Lua modules, and Gadgets

Jackmcbarn claimed this task.

Closing then, as there's nothing to do. It doesn't make sense to make a task a blocking task if there's no work to do for it.

Rical renamed this task from Get the own module name and last record date-time from each module to Get the own module name and record-time of all modules to manage, without errors, versions sought by the main module.May 21 2016, 11:45 AM
Rical reopened this task as Open.

@Rical, you still haven't given a specific example of what you'd like to be done in Scribunto.

Rical renamed this task from Get the own module name and record-time of all modules to manage, without errors, versions sought by the main module to Get the own module name and record-time of all modules to better manage sub-modules versions.May 22 2016, 10:27 AM
Rical updated the task description. (Show Details)
Rical renamed this task from Get the own module name and record-time of all modules to better manage sub-modules versions to Get name and record-time of all modules to better manage their versions.May 23 2016, 9:53 AM

I still don't see anything to do here. Please give a clear, specific description of what functionality you want to be added.

Now I think your are right.
In T119978#1881890 I writed "this task is no more needed."
After the time I created it, I has found ways to collect needed datas.
And I also "repaired" T122752 = #invoke do not record the main module in package.loaded

I close it.

Aklapper changed the task status from Resolved to Invalid.May 24 2016, 12:00 PM