From 8e59e789dc0698a00f91ac37c96d6563c1fae310 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Tue, 17 Sep 2013 19:26:32 +0400 Subject: [PATCH] Extract util.runtime module out of util Cleanup module dependencies: a lot of modules depended on 'frontend.java' just to use something from 'util' module, exported by 'frontend.java', whereas they really need nothing from 'frontend.java'. Also 'frontend.java' just exported 'util', not using anything from it. Create a new 'util.runtime' module, which will be available at runtime. Make 'util' export 'util.runtime' and make all modules who needed these utils depend on 'util' directly instead of 'frontend.java' --- .idea/artifacts/KotlinPlugin.xml | 1 + .idea/modules.xml | 3 ++- build-tools/build-tools.iml | 2 +- build.xml | 3 +++ compiler/android-tests/android-tests.iml | 2 +- compiler/cli/cli.iml | 1 + compiler/frontend.java/frontend.java.iml | 1 - compiler/frontend/serialization/serialization.iml | 2 +- compiler/jet.as.java.psi/jet.as.java.psi.iml | 1 + compiler/tests/compiler-tests.iml | 1 + compiler/util/util.iml | 1 + .../src/org/jetbrains/jet/utils/DFS.java | 0 .../src/org/jetbrains/jet/utils/ExceptionUtils.java | 0 .../jet/utils/NotNullMemoizedFunction.java | 0 .../jet/utils/NullableMemoizedFunction.java | 0 .../src/org/jetbrains/jet/utils/WrappedValues.java | 0 core/util.runtime/util.runtime.iml | 13 +++++++++++++ generators/generators.iml | 1 + idea/idea.iml | 1 + injector-generator/injector-generator.iml | 2 +- js/js.tests/js.tests.iml | 2 +- 21 files changed, 30 insertions(+), 7 deletions(-) rename {compiler/util => core/util.runtime}/src/org/jetbrains/jet/utils/DFS.java (100%) rename {compiler/util => core/util.runtime}/src/org/jetbrains/jet/utils/ExceptionUtils.java (100%) rename {compiler/util => core/util.runtime}/src/org/jetbrains/jet/utils/NotNullMemoizedFunction.java (100%) rename {compiler/util => core/util.runtime}/src/org/jetbrains/jet/utils/NullableMemoizedFunction.java (100%) rename {compiler/util => core/util.runtime}/src/org/jetbrains/jet/utils/WrappedValues.java (100%) create mode 100644 core/util.runtime/util.runtime.iml diff --git a/.idea/artifacts/KotlinPlugin.xml b/.idea/artifacts/KotlinPlugin.xml index 301708fd5d3..2b330cf6985 100644 --- a/.idea/artifacts/KotlinPlugin.xml +++ b/.idea/artifacts/KotlinPlugin.xml @@ -13,6 +13,7 @@ + diff --git a/.idea/modules.xml b/.idea/modules.xml index fc4c4f5c123..ce8b01f9be2 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -31,8 +31,9 @@ - + + diff --git a/build-tools/build-tools.iml b/build-tools/build-tools.iml index 7e88bcace67..2225c89f93b 100644 --- a/build-tools/build-tools.iml +++ b/build-tools/build-tools.iml @@ -9,7 +9,6 @@ - @@ -23,6 +22,7 @@ + diff --git a/build.xml b/build.xml index a9a08eb3f89..51f917275c9 100644 --- a/build.xml +++ b/build.xml @@ -32,6 +32,7 @@ + @@ -51,6 +52,7 @@ + @@ -136,6 +138,7 @@ + diff --git a/compiler/android-tests/android-tests.iml b/compiler/android-tests/android-tests.iml index 30dba87a875..823c446f70c 100644 --- a/compiler/android-tests/android-tests.iml +++ b/compiler/android-tests/android-tests.iml @@ -11,10 +11,10 @@ - + diff --git a/compiler/cli/cli.iml b/compiler/cli/cli.iml index d729c5ca03a..6760729a8e7 100644 --- a/compiler/cli/cli.iml +++ b/compiler/cli/cli.iml @@ -17,6 +17,7 @@ + diff --git a/compiler/frontend.java/frontend.java.iml b/compiler/frontend.java/frontend.java.iml index 275f6c2cfff..5cd8c2e9746 100644 --- a/compiler/frontend.java/frontend.java.iml +++ b/compiler/frontend.java/frontend.java.iml @@ -9,7 +9,6 @@ - diff --git a/compiler/frontend/serialization/serialization.iml b/compiler/frontend/serialization/serialization.iml index c08191ba561..3a14cef9af4 100644 --- a/compiler/frontend/serialization/serialization.iml +++ b/compiler/frontend/serialization/serialization.iml @@ -13,7 +13,7 @@ - + diff --git a/compiler/jet.as.java.psi/jet.as.java.psi.iml b/compiler/jet.as.java.psi/jet.as.java.psi.iml index f4381227ffe..ed3221ac3ca 100644 --- a/compiler/jet.as.java.psi/jet.as.java.psi.iml +++ b/compiler/jet.as.java.psi/jet.as.java.psi.iml @@ -12,6 +12,7 @@ + diff --git a/compiler/tests/compiler-tests.iml b/compiler/tests/compiler-tests.iml index 3b17231d513..260be58cf28 100644 --- a/compiler/tests/compiler-tests.iml +++ b/compiler/tests/compiler-tests.iml @@ -19,6 +19,7 @@ + diff --git a/compiler/util/util.iml b/compiler/util/util.iml index d0a04b011b4..dac3c15c169 100644 --- a/compiler/util/util.iml +++ b/compiler/util/util.iml @@ -8,6 +8,7 @@ + diff --git a/compiler/util/src/org/jetbrains/jet/utils/DFS.java b/core/util.runtime/src/org/jetbrains/jet/utils/DFS.java similarity index 100% rename from compiler/util/src/org/jetbrains/jet/utils/DFS.java rename to core/util.runtime/src/org/jetbrains/jet/utils/DFS.java diff --git a/compiler/util/src/org/jetbrains/jet/utils/ExceptionUtils.java b/core/util.runtime/src/org/jetbrains/jet/utils/ExceptionUtils.java similarity index 100% rename from compiler/util/src/org/jetbrains/jet/utils/ExceptionUtils.java rename to core/util.runtime/src/org/jetbrains/jet/utils/ExceptionUtils.java diff --git a/compiler/util/src/org/jetbrains/jet/utils/NotNullMemoizedFunction.java b/core/util.runtime/src/org/jetbrains/jet/utils/NotNullMemoizedFunction.java similarity index 100% rename from compiler/util/src/org/jetbrains/jet/utils/NotNullMemoizedFunction.java rename to core/util.runtime/src/org/jetbrains/jet/utils/NotNullMemoizedFunction.java diff --git a/compiler/util/src/org/jetbrains/jet/utils/NullableMemoizedFunction.java b/core/util.runtime/src/org/jetbrains/jet/utils/NullableMemoizedFunction.java similarity index 100% rename from compiler/util/src/org/jetbrains/jet/utils/NullableMemoizedFunction.java rename to core/util.runtime/src/org/jetbrains/jet/utils/NullableMemoizedFunction.java diff --git a/compiler/util/src/org/jetbrains/jet/utils/WrappedValues.java b/core/util.runtime/src/org/jetbrains/jet/utils/WrappedValues.java similarity index 100% rename from compiler/util/src/org/jetbrains/jet/utils/WrappedValues.java rename to core/util.runtime/src/org/jetbrains/jet/utils/WrappedValues.java diff --git a/core/util.runtime/util.runtime.iml b/core/util.runtime/util.runtime.iml new file mode 100644 index 00000000000..d0a04b011b4 --- /dev/null +++ b/core/util.runtime/util.runtime.iml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/generators/generators.iml b/generators/generators.iml index f4b45cef115..fa0ffa7a831 100644 --- a/generators/generators.iml +++ b/generators/generators.iml @@ -20,6 +20,7 @@ + diff --git a/idea/idea.iml b/idea/idea.iml index 53fb442a634..446dce222a1 100644 --- a/idea/idea.iml +++ b/idea/idea.iml @@ -40,6 +40,7 @@ + diff --git a/injector-generator/injector-generator.iml b/injector-generator/injector-generator.iml index 81a535f8a98..03570e3cc59 100644 --- a/injector-generator/injector-generator.iml +++ b/injector-generator/injector-generator.iml @@ -8,10 +8,10 @@ - + diff --git a/js/js.tests/js.tests.iml b/js/js.tests/js.tests.iml index 408bd4e304e..1e4130900f8 100644 --- a/js/js.tests/js.tests.iml +++ b/js/js.tests/js.tests.iml @@ -14,8 +14,8 @@ - +