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'"
_______________________________________________ lively-kernel mailing list [email protected] http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
