Skip to content

Commit

Permalink
lint: improved the logic of "CyclicModuleDependenciesHelper"
Browse files Browse the repository at this point in the history
  • Loading branch information
danielratiu committed Nov 10, 2023
1 parent bc4c73f commit b67c071
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3690,7 +3690,7 @@
<property role="TrG5h" value="allCycles" />
<node concept="2hMVRd" id="5EjFUKYhsce" role="1tU5fm">
<node concept="3uibUv" id="3b1aCyfUejc" role="2hN53Y">
<ref role="3uigEE" to="33ny:~Set" resolve="Set" />
<ref role="3uigEE" to="33ny:~ArrayList" resolve="ArrayList" />
<node concept="3uibUv" id="3b1aCyfUejd" role="11_B2D">
<ref role="3uigEE" to="lui2:~SModule" resolve="SModule" />
</node>
Expand All @@ -3716,7 +3716,7 @@
<node concept="3eOSWO" id="3b1aCyfYjcv" role="3clFbw">
<node concept="2OqwBi" id="47tbZooVum3" role="3uHU7B">
<node concept="liA8E" id="3b1aCyfUg_9" role="2OqNvi">
<ref role="37wK5l" to="33ny:~Set.size()" resolve="size" />
<ref role="37wK5l" to="33ny:~ArrayList.size()" resolve="size" />
</node>
<node concept="2GrUjf" id="47tbZooZWiy" role="2Oq$k0">
<ref role="2Gs0qQ" node="47tbZooVr5N" resolve="crtCycle" />
Expand All @@ -3742,48 +3742,16 @@
<ref role="2Gs0qQ" node="47tbZooVr5N" resolve="crtCycle" />
</node>
<node concept="liA8E" id="3b1aCyfYkRZ" role="2OqNvi">
<ref role="37wK5l" to="33ny:~Set.size()" resolve="size" />
<ref role="37wK5l" to="33ny:~ArrayList.size()" resolve="size" />
</node>
</node>
</node>
<node concept="Xl_RD" id="3b1aCyfYkS0" role="3uHU7w">
<property role="Xl_RC" value=" found " />
</node>
</node>
<node concept="2OqwBi" id="3b1aCyfYkS1" role="3uHU7w">
<node concept="2ShNRf" id="3b1aCyfYkS2" role="2Oq$k0">
<node concept="Tc6Ow" id="3b1aCyfYkS3" role="2ShVmc">
<node concept="3uibUv" id="3b1aCyfYkS4" role="HW$YZ">
<ref role="3uigEE" to="lui2:~SModule" resolve="SModule" />
</node>
<node concept="2GrUjf" id="3b1aCyfYkS5" role="I$8f6">
<ref role="2Gs0qQ" node="47tbZooVr5N" resolve="crtCycle" />
</node>
</node>
</node>
<node concept="2S7cBI" id="3b1aCyfYkS6" role="2OqNvi">
<node concept="1bVj0M" id="3b1aCyfYkS7" role="23t8la">
<node concept="3clFbS" id="3b1aCyfYkS8" role="1bW5cS">
<node concept="3clFbF" id="3b1aCyfYkS9" role="3cqZAp">
<node concept="2OqwBi" id="3b1aCyfYkSa" role="3clFbG">
<node concept="37vLTw" id="3b1aCyfYkSb" role="2Oq$k0">
<ref role="3cqZAo" node="3b1aCyfYkSd" resolve="it" />
</node>
<node concept="liA8E" id="3b1aCyfYkSc" role="2OqNvi">
<ref role="37wK5l" to="lui2:~SModule.getModuleName()" resolve="getModuleName" />
</node>
</node>
</node>
</node>
<node concept="Rh6nW" id="3b1aCyfYkSd" role="1bW2Oz">
<property role="TrG5h" value="it" />
<node concept="2jxLKc" id="3b1aCyfYkSe" role="1tU5fm" />
</node>
</node>
<node concept="1nlBCl" id="3b1aCyfYkSf" role="2S7zOq">
<property role="3clFbU" value="true" />
</node>
</node>
<node concept="2GrUjf" id="7rvIjoqG9W4" role="3uHU7w">
<ref role="2Gs0qQ" node="47tbZooVr5N" resolve="crtCycle" />
</node>
</node>
</node>
Expand Down Expand Up @@ -3861,7 +3829,7 @@
<property role="TrG5h" value="allCycles" />
<node concept="2hMVRd" id="5EjFUKYg4rz" role="1tU5fm">
<node concept="3uibUv" id="3b1aCyfTZ4P" role="2hN53Y">
<ref role="3uigEE" to="33ny:~Set" resolve="Set" />
<ref role="3uigEE" to="33ny:~ArrayList" resolve="ArrayList" />
<node concept="3uibUv" id="3b1aCyfU5B1" role="11_B2D">
<ref role="3uigEE" to="lui2:~SModule" resolve="SModule" />
</node>
Expand All @@ -3870,7 +3838,7 @@
<node concept="2ShNRf" id="47tbZooUQfq" role="33vP2m">
<node concept="2i4dXS" id="5EjFUKYgiTr" role="2ShVmc">
<node concept="3uibUv" id="3b1aCyfU8XI" role="HW$YZ">
<ref role="3uigEE" to="33ny:~Set" resolve="Set" />
<ref role="3uigEE" to="33ny:~ArrayList" resolve="ArrayList" />
<node concept="3uibUv" id="3b1aCyfU8XJ" role="11_B2D">
<ref role="3uigEE" to="lui2:~SModule" resolve="SModule" />
</node>
Expand Down Expand Up @@ -3961,23 +3929,41 @@
<node concept="3cpWs8" id="6o7R8_1wBcm" role="3cqZAp">
<node concept="3cpWsn" id="6o7R8_1wBcn" role="3cpWs9">
<property role="TrG5h" value="crtPath" />
<node concept="2hMVRd" id="2XcG3COVhI4" role="1tU5fm">
<node concept="3uibUv" id="2XcG3COVhI6" role="2hN53Y">
<node concept="_YKpA" id="7rvIjoqGQ2J" role="1tU5fm">
<node concept="3uibUv" id="7rvIjoqGQ2L" role="_ZDj9">
<ref role="3uigEE" to="lui2:~SModule" resolve="SModule" />
</node>
</node>
<node concept="2ShNRf" id="6o7R8_1wBco" role="33vP2m">
<node concept="2i4dXS" id="2XcG3COVeU0" role="2ShVmc">
<node concept="3uibUv" id="2XcG3COVeU2" role="HW$YZ">
<node concept="Tc6Ow" id="7rvIjoqGSqV" role="2ShVmc">
<node concept="3uibUv" id="7rvIjoqGSqX" role="HW$YZ">
<ref role="3uigEE" to="lui2:~SModule" resolve="SModule" />
</node>
<node concept="2GrUjf" id="2XcG3COVeU3" role="HW$Y0">
<node concept="2GrUjf" id="7rvIjoqGSqY" role="HW$Y0">
<ref role="2Gs0qQ" node="4aEqBbb$ikl" resolve="module" />
</node>
</node>
</node>
</node>
</node>
<node concept="3cpWs8" id="FXJmdIiX8a" role="3cqZAp">
<node concept="3cpWsn" id="FXJmdIiX8b" role="3cpWs9">
<property role="TrG5h" value="alreadyVisitedModulesForCurrentSeed" />
<node concept="2hMVRd" id="FXJmdIiX8c" role="1tU5fm">
<node concept="3uibUv" id="FXJmdIiX8d" role="2hN53Y">
<ref role="3uigEE" to="lui2:~SModule" resolve="SModule" />
</node>
</node>
<node concept="2ShNRf" id="FXJmdIiX8e" role="33vP2m">
<node concept="2i4dXS" id="FXJmdIiX8f" role="2ShVmc">
<node concept="3uibUv" id="FXJmdIiX8g" role="HW$YZ">
<ref role="3uigEE" to="lui2:~SModule" resolve="SModule" />
</node>
</node>
</node>
</node>
</node>
<node concept="3clFbH" id="FXJmdIiVm$" role="3cqZAp" />
<node concept="3clFbF" id="4aEqBbbBwvs" role="3cqZAp">
<node concept="2YIFZM" id="4aEqBbbBw$Z" role="3clFbG">
<ref role="1Pybhc" node="4aEqBbbBtjF" resolve="CyclicModuleDependenciesHelper" />
Expand All @@ -4003,6 +3989,9 @@
<node concept="37vLTw" id="47tbZooUXHt" role="37wK5m">
<ref role="3cqZAo" node="47tbZooUHyP" resolve="allCycles" />
</node>
<node concept="37vLTw" id="FXJmdIjryR" role="37wK5m">
<ref role="3cqZAo" node="FXJmdIiX8b" resolve="alreadyVisitedModulesForCurrentSeed" />
</node>
</node>
</node>
</node>
Expand Down Expand Up @@ -4053,7 +4042,7 @@
</node>
<node concept="2hMVRd" id="5EjFUKYg0p8" role="3clF45">
<node concept="3uibUv" id="3b1aCyfUc9W" role="2hN53Y">
<ref role="3uigEE" to="33ny:~Set" resolve="Set" />
<ref role="3uigEE" to="33ny:~ArrayList" resolve="ArrayList" />
<node concept="3uibUv" id="3b1aCyfUc9X" role="11_B2D">
<ref role="3uigEE" to="lui2:~SModule" resolve="SModule" />
</node>
Expand Down Expand Up @@ -4268,8 +4257,8 @@
</node>
<node concept="37vLTG" id="4aEqBbbBtsv" role="3clF46">
<property role="TrG5h" value="crtPath" />
<node concept="2hMVRd" id="2XcG3COUoJP" role="1tU5fm">
<node concept="3uibUv" id="2XcG3COUoJR" role="2hN53Y">
<node concept="_YKpA" id="7rvIjoqGKWN" role="1tU5fm">
<node concept="3uibUv" id="7rvIjoqGKWP" role="_ZDj9">
<ref role="3uigEE" to="lui2:~SModule" resolve="SModule" />
</node>
</node>
Expand All @@ -4286,13 +4275,21 @@
<property role="TrG5h" value="allCycles" />
<node concept="2hMVRd" id="5EjFUKYgp8a" role="1tU5fm">
<node concept="3uibUv" id="3b1aCyfTl6q" role="2hN53Y">
<ref role="3uigEE" to="33ny:~Set" resolve="Set" />
<ref role="3uigEE" to="33ny:~ArrayList" resolve="ArrayList" />
<node concept="3uibUv" id="3b1aCyfTuIn" role="11_B2D">
<ref role="3uigEE" to="lui2:~SModule" resolve="SModule" />
</node>
</node>
</node>
</node>
<node concept="37vLTG" id="FXJmdIi6Ai" role="3clF46">
<property role="TrG5h" value="alreadyVisitedModulesForCurrentSeed" />
<node concept="2hMVRd" id="FXJmdIi9dI" role="1tU5fm">
<node concept="3uibUv" id="FXJmdIibUZ" role="2hN53Y">
<ref role="3uigEE" to="lui2:~SModule" resolve="SModule" />
</node>
</node>
</node>
<node concept="3clFbS" id="4aEqBbbBts2" role="3clF47">
<node concept="3cpWs8" id="4aEqBbb$QOK" role="3cqZAp">
<node concept="3cpWsn" id="4aEqBbb$QOL" role="3cpWs9">
Expand Down Expand Up @@ -4321,6 +4318,21 @@
<ref role="3cqZAo" node="4aEqBbb$QOL" resolve="myDependencies" />
</node>
<node concept="3clFbS" id="4aEqBbb$wqz" role="2LFqv$">
<node concept="3clFbJ" id="FXJmdIjGr3" role="3cqZAp">
<node concept="3clFbS" id="FXJmdIjGr5" role="3clFbx">
<node concept="3N13vt" id="FXJmdIjU_s" role="3cqZAp" />
</node>
<node concept="2OqwBi" id="FXJmdIjNDO" role="3clFbw">
<node concept="37vLTw" id="FXJmdIjNDP" role="2Oq$k0">
<ref role="3cqZAo" node="FXJmdIi6Ai" resolve="alreadyVisitedModulesForCurrentSeed" />
</node>
<node concept="3JPx81" id="FXJmdIjNDQ" role="2OqNvi">
<node concept="2GrUjf" id="FXJmdIjNDR" role="25WWJ7">
<ref role="2Gs0qQ" node="4aEqBbb$wqv" resolve="d" />
</node>
</node>
</node>
</node>
<node concept="3clFbJ" id="3b1aCyfIkSZ" role="3cqZAp">
<node concept="3clFbS" id="3b1aCyfIkT1" role="3clFbx">
<node concept="3N13vt" id="3b1aCyfIVzZ" role="3cqZAp" />
Expand Down Expand Up @@ -4369,7 +4381,7 @@
<node concept="2ShNRf" id="3b1aCyfQZqp" role="25WWJ7">
<node concept="1pGfFk" id="3b1aCyfTEQ6" role="2ShVmc">
<property role="373rjd" value="true" />
<ref role="37wK5l" to="33ny:~HashSet.&lt;init&gt;(java.util.Collection)" resolve="HashSet" />
<ref role="37wK5l" to="33ny:~ArrayList.&lt;init&gt;(java.util.Collection)" resolve="ArrayList" />
<node concept="3uibUv" id="3b1aCyfTJyg" role="1pMfVU">
<ref role="3uigEE" to="lui2:~SModule" resolve="SModule" />
</node>
Expand Down Expand Up @@ -4444,6 +4456,9 @@
<node concept="37vLTw" id="47tbZooQWXa" role="37wK5m">
<ref role="3cqZAo" node="47tbZooUZde" resolve="allCycles" />
</node>
<node concept="37vLTw" id="FXJmdIiRDT" role="37wK5m">
<ref role="3cqZAo" node="FXJmdIi6Ai" resolve="alreadyVisitedModules" />
</node>
</node>
</node>
<node concept="3clFbF" id="4aEqBbbC3xm" role="3cqZAp">
Expand All @@ -4460,6 +4475,18 @@
</node>
</node>
</node>
<node concept="3clFbF" id="FXJmdIiAbu" role="3cqZAp">
<node concept="2OqwBi" id="FXJmdIiCZR" role="3clFbG">
<node concept="37vLTw" id="FXJmdIiAbs" role="2Oq$k0">
<ref role="3cqZAo" node="FXJmdIi6Ai" resolve="alreadyVisitedModulesForCurrentSeed" />
</node>
<node concept="TSZUe" id="FXJmdIiGFC" role="2OqNvi">
<node concept="37vLTw" id="7rvIjoqE_tT" role="25WWJ7">
<ref role="3cqZAo" node="2XcG3COTH2i" resolve="crtModule" />
</node>
</node>
</node>
</node>
</node>
<node concept="3cqZAl" id="4aEqBbbBtrN" role="3clF45" />
</node>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,11 @@
<persistence version="9" />
<languages>
<use id="7866978e-a0f0-4cc7-81bc-4d213d9375e1" name="jetbrains.mps.lang.smodel" version="19" />
<use id="40ab19e9-751a-4433-b645-0e65160e58a0" name="org.mpsqa.lint.generic" version="0" />
<use id="83888646-71ce-4f1c-9c53-c54016f6ad4f" name="jetbrains.mps.baseLanguage.collections" version="1" />
<use id="c7fb639f-be78-4307-89b0-b5959c3fa8c8" name="jetbrains.mps.lang.text" version="0" />
<use id="1a8554c4-eb84-43ba-8c34-6f0d90c6e75a" name="jetbrains.mps.lang.smodel.query" version="3" />
<use id="f3061a53-9226-4cc5-a443-f952ceaf5816" name="jetbrains.mps.baseLanguage" version="12" />
<use id="760a0a8c-eabb-4521-8bfd-65db761a9ba3" name="jetbrains.mps.baseLanguage.logging" version="0" />
<use id="22e72e4c-0f69-46ce-8403-6750153aa615" name="jetbrains.mps.execution.configurations" version="2" />
<use id="de1ad86d-6e50-4a02-b306-d4d17f64c375" name="jetbrains.mps.console.base" version="0" />
<use id="f26691d2-0def-4c06-aec6-2cb90c4af0a4" name="jetbrains.mps.console.scripts" version="0" />
<use id="63650c59-16c8-498a-99c8-005c7ee9515d" name="jetbrains.mps.lang.access" version="0" />
</languages>
<imports>
<import index="lui2" ref="8865b7a8-5271-43d3-884c-6fd1d9cfdd34/java:org.jetbrains.mps.openapi.module(MPS.OpenAPI/)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,18 @@
<dependency reexport="false">40ab19e9-751a-4433-b645-0e65160e58a0(org.mpsqa.lint.generic)</dependency>
<dependency reexport="false">742f6602-5a2f-4313-aa6e-ae1cd4ffdc61(MPS.Platform)</dependency>
<dependency reexport="false">a1250a4d-c090-42c3-ad7c-d298a3357dd4(jetbrains.mps.make.runtime)</dependency>
<dependency reexport="false">12a40499-ed72-4b23-9437-358c4217c97b(org.mpsqa.lint.mps_lang.linters_library)</dependency>
</dependencies>
<languageVersions>
<language slang="l:f3061a53-9226-4cc5-a443-f952ceaf5816:jetbrains.mps.baseLanguage" version="12" />
<language slang="l:443f4c36-fcf5-4eb6-9500-8d06ed259e3e:jetbrains.mps.baseLanguage.classifiers" version="0" />
<language slang="l:fd392034-7849-419d-9071-12563d152375:jetbrains.mps.baseLanguage.closures" version="0" />
<language slang="l:83888646-71ce-4f1c-9c53-c54016f6ad4f:jetbrains.mps.baseLanguage.collections" version="1" />
<language slang="l:760a0a8c-eabb-4521-8bfd-65db761a9ba3:jetbrains.mps.baseLanguage.logging" version="0" />
<language slang="l:de1ad86d-6e50-4a02-b306-d4d17f64c375:jetbrains.mps.console.base" version="0" />
<language slang="l:f26691d2-0def-4c06-aec6-2cb90c4af0a4:jetbrains.mps.console.scripts" version="0" />
<language slang="l:73c1a490-99fa-4d0d-8292-b8985697c74b:jetbrains.mps.execution.common" version="0" />
<language slang="l:22e72e4c-0f69-46ce-8403-6750153aa615:jetbrains.mps.execution.configurations" version="2" />
<language slang="l:756e911c-3f1f-4a48-bdf5-a2ceb91b723c:jetbrains.mps.execution.settings" version="0" />
<language slang="l:63650c59-16c8-498a-99c8-005c7ee9515d:jetbrains.mps.lang.access" version="0" />
<language slang="l:ceab5195-25ea-4f22-9b92-103b95ca8c0c:jetbrains.mps.lang.core" version="2" />
<language slang="l:446c26eb-2b7b-4bf0-9b35-f83fa582753e:jetbrains.mps.lang.modelapi" version="0" />
<language slang="l:7866978e-a0f0-4cc7-81bc-4d213d9375e1:jetbrains.mps.lang.smodel" version="19" />
<language slang="l:1a8554c4-eb84-43ba-8c34-6f0d90c6e75a:jetbrains.mps.lang.smodel.query" version="3" />
<language slang="l:c72da2b9-7cce-4447-8389-f407dc1158b7:jetbrains.mps.lang.structure" version="9" />
<language slang="l:c7fb639f-be78-4307-89b0-b5959c3fa8c8:jetbrains.mps.lang.text" version="0" />
<language slang="l:9ded098b-ad6a-4657-bfd9-48636cfe8bc3:jetbrains.mps.lang.traceable" version="0" />
<language slang="l:40ab19e9-751a-4433-b645-0e65160e58a0:org.mpsqa.lint.generic" version="0" />
Expand All @@ -54,12 +47,12 @@
<module reference="e39e4a59-8cb6-498e-860e-8fa8361c0d90(jetbrains.mps.baseLanguage.scopes)" version="0" />
<module reference="2d3c70e9-aab2-4870-8d8d-6036800e4103(jetbrains.mps.kernel)" version="0" />
<module reference="ceab5195-25ea-4f22-9b92-103b95ca8c0c(jetbrains.mps.lang.core)" version="0" />
<module reference="c7fb639f-be78-4307-89b0-b5959c3fa8c8(jetbrains.mps.lang.text)" version="0" />
<module reference="9ded098b-ad6a-4657-bfd9-48636cfe8bc3(jetbrains.mps.lang.traceable)" version="0" />
<module reference="a1250a4d-c090-42c3-ad7c-d298a3357dd4(jetbrains.mps.make.runtime)" version="0" />
<module reference="40ab19e9-751a-4433-b645-0e65160e58a0(org.mpsqa.lint.generic)" version="0" />
<module reference="a86f8e91-0c59-4691-a7ce-49b7e2c7c3a9(org.mpsqa.lint.generic.linters_library)" version="0" />
<module reference="6ce900c0-bfaf-49ef-a192-9b1044b1ac55(org.mpsqa.lint.generic.sandbox)" version="0" />
<module reference="12a40499-ed72-4b23-9437-358c4217c97b(org.mpsqa.lint.mps_lang.linters_library)" version="0" />
</dependencyVersions>
</solution>

Loading

0 comments on commit b67c071

Please sign in to comment.