[lively-kernel] [ANN} Codebase-utilities

Keith P. Hodges keith_hodges at yahoo.co.uk
Mon Oct 31 19:42:28 CET 2011


Don't know how practically useful this is yet.

cd repo/codebase
../../utils/reorg/scan --modules | ../../utils/reorg/correct-modules | ../../utils/reorg/apply --global

What it does:

A: scan the codebase for files with module definitions

example portion of output:

core/AST/generated/Translator.js: 
- - "'lively.AST.generated.Translator'"
modules/morphic/ObjectMigration.js: 
- - "'lively.morphic.ObjectMigration'"

B: for each module name, check what it thinks the correct module name should be based upon the filename

core/AST/generated/Translator.js: 
- - "'lively.AST.generated.Translator'"
  - "'core.AST.generated.Translator'"
modules/morphic/ObjectMigration.js: 
- - "'lively.morphic.ObjectMigration'"
  - "'modules.morphic.ObjectMigration'"

C: Apply each of the above as a find/replace globally to the whole codebase.

In theory this allows us to do one of two things, either:

 A, automatically mess up the codebase completely! Or B, to reorganise modules and files at will, using this method to fix things up.

Due to class naming conventions I don't think we are at B yet, but we might be getting there.

Keith

===

p.s. in the meantime, it has shown up four modules which appear to be misnamed in webwerkstatt

lively/morphic/HTML.js: 
- - "'apps.Base64'"
lively/persistence/Serializer.js: 
- - "'cop.Layers'"
cop/Layers.js: 
- - "'cop.Flatten'"
Tests/testRessources/combinedFooBar.js: 
- - "'Tests.testRessources.Foo'"
  - "'Tests.testRessources.combinedFooBar'"
- - "'Tests.testRessources.Bar'"
apps/DiffMatchPatch.js: 
- - "'lib.diff_match_patch.diff_match_patch_uncompressed'"
ometa/bs-ometa-compiler.js: 
- - "'ometa/bs-ometa-compiler.js'"
  - "'ometa.bs-ometa-compiler'"
lively/morphic/Widgets.js: 
- - "'lively.ide'"
lively/NewMorphicCompat.js: 
- - "'lively.morphic'"
lively/morphic/Events.js: 
- - "'lively.morphic.ClickOnLineHack'"
- - "'lively.morphic.EventExperiments'"
lively/morphic/Connectors.js: 
- - "'lively.LayerableMorphs'"
lib/splitterjsobj/splitter_v1_2_0.js: 
- - "'splitterjsobj.splitter_v1_2_0'"
  - "'lib.splitterjsobj.splitter_v1_2_0'"
Tests/lively/morphic/video/VideoTest.js: 
- - "'lively.morphic.video.VideoTest'"
  - "'Tests.lively.morphic.video.VideoTest'"
Tests/ToolsTests.js: 
- - "'dummySource'"
- - "'bla.blupf'"
- - "'lively.Examples'"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hpi.uni-potsdam.de/archive/lively-kernel/attachments/20111031/8c5c7092/attachment.html>


More information about the lively-kernel mailing list