Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1627)

Issue 343030043: More flexible create-module.py and contrib/wscript

Can't Edit
Can't Publish+Mail
Start Review
Created:
7 months, 2 weeks ago by Peter Barnes
Modified:
4 weeks ago
Reviewers:
Tom Henderson
CC:
ns-3-reviews_googlegroups.com
Visibility:
Public.

Description

Consider a project in contrib which wants this structure pulled from a single repo: contrib/ wscript project/ .repo // could be .git or .hg, for example main/ wscript // builds executable 'project' from main.cc and other.cc main.cc other.cc modules/ moduleA/ // Contains normal module structure wscript model/ ... moduleB/ // Contains normal module structure data/ // No source code here, so no wscript One can't do this at the moment for two reasons: * contrib/wscript won't recognize the project directory because the top level does not contain a wscript file * Each "normal" module directory has to be created by hand, or created in src, then moved to its final location. This patch provides two enhancements to enable this kind of project: 1. Enable the create-module.py script to create modules in the contrib directory, as well as the src directory. 2. Enable modules in the contrib directory to have arbitrary structure. To accomplish these goals the patch modifies a couple of heuristics: * create-module.py accepts arbitrary paths, using the last path element as the name of the module (but see the question below). * contrib/wscript walks the directory tree, looking for directories containing wscript files. When found, add that directory to the list of contrib modules to process. It is not an error for a tree under contrib not to contain any wscript files; this tree is simply ignored. (The data directory above is an example.) Since create-module.py is more general, this patch moves it to the utils directory. Question: Should we restrict to just module paths matching src/new-module and contrib/new-module? The first restriction might be useful. The second conflicts with allowing contrib modules to have arbitrary structure.

Patch Set 1 #

Patch Set 2 : Revised patch #

Patch Set 3 : Revised to build projects as well #

Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -51 lines) Patch
M doc/manual/source/documentation.rst View 1 chunk +1 line, -1 line 0 comments Download
M doc/manual/source/how-to-write-tests.rst View 1 chunk +1 line, -1 line 0 comments Download
M doc/manual/source/new-modules.rst View 1 1 chunk +11 lines, -4 lines 0 comments Download
M utils/create-module.py View 1 2 7 chunks +112 lines, -45 lines 0 comments Download

Messages

Total messages: 11
Tom Henderson
(this is mainly an initial comment to check whether it will post to ns-3-reviews; initial ...
7 months, 2 weeks ago (2018-04-25 17:22:55 UTC) #1
Peter Barnes
On 2018/04/25 17:22:55, Tom Henderson wrote: > Is there a need perhaps to have both ...
7 months, 2 weeks ago (2018-04-25 17:34:43 UTC) #2
Tom Henderson
On 2018/04/25 17:34:43, Peter Barnes wrote: > On 2018/04/25 17:22:55, Tom Henderson wrote: > > ...
7 months, 2 weeks ago (2018-04-25 17:42:43 UTC) #3
Peter Barnes
Fixed test issue in listing available test.
6 months, 2 weeks ago (2018-05-24 20:09:41 UTC) #4
Peter Barnes
@Tom: I don't understand your last comment re: project grouping and project structure... Are there ...
4 months ago (2018-08-06 23:13:49 UTC) #5
Tom Henderson
On 2018/08/06 23:13:49, Peter Barnes wrote: > @Tom: I don't understand your last comment re: ...
3 months, 4 weeks ago (2018-08-12 22:48:11 UTC) #6
Peter Barnes
On 2018/08/12 22:48:11, Tom Henderson wrote: > > utils/create-project.py contrib/projectname moduleNameA moduleNameB moduleNameC > > ...
3 months, 4 weeks ago (2018-08-13 17:12:47 UTC) #7
Peter Barnes
> utils/create-module.py --project projectname moduleA moduleB moduleC > > One script to rule them all. ...
3 months ago (2018-09-11 00:01:43 UTC) #8
Tom Henderson
I support merging this, although my testing of it today suggests it may need tweaking. ...
2 months ago (2018-10-08 19:05:11 UTC) #9
Peter Barnes
On 2018/10/08 19:05:11, Tom Henderson wrote: > Do we make 'src' or 'contrib' the default? ...
2 months ago (2018-10-08 19:25:46 UTC) #10
Peter Barnes
4 weeks ago (2018-11-12 19:16:39 UTC) #11
Also need to revise the file templates to refer to contrib module files by the
correct path (not 'src/foo/...')
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b