diff --git a/src/asset_bundle/all/generate/GenerateAllABSystem.re b/src/asset_bundle/all/generate/GenerateAllABSystem.re index ca03695d9b..1f706b1ea5 100755 --- a/src/asset_bundle/all/generate/GenerateAllABSystem.re +++ b/src/asset_bundle/all/generate/GenerateAllABSystem.re @@ -3,7 +3,7 @@ open WonderBsMost; /* open DependencyDataType; */ /* TODO need test */ -let rec _isCircleDependency = +/* let rec _isCircleDependency = ( dependencyRelation, recordedAbPathArr, @@ -73,7 +73,7 @@ let _checkCircleDependency = dependencyRelation => ~params={j||j}, ), ) : - (); + (); */ /* let _checkSABDependencyRelation = () => { @@ -91,9 +91,8 @@ let buildDependencyRelation = dependencyRelationArrArr => WonderCommonlib.ImmutableHashMapService.createEmpty(), ); -let generate = (dependencyRelation, (sabDataArr, rabDataArr)) => { - _checkCircleDependency(dependencyRelation); - +let generate = (dependencyRelation, (sabDataArr, rabDataArr)) => + /* _checkCircleDependency(dependencyRelation); */ RemoveDependencyDataSystem.removeDuplicateBufferData( dependencyRelation, FindDependencyDataSystem.buildImageAndGeometryNameMap(rabDataArr), @@ -106,5 +105,4 @@ let generate = (dependencyRelation, (sabDataArr, rabDataArr)) => { newRabDataArr, newSabDataArr, ) - ); -}; \ No newline at end of file + ); \ No newline at end of file diff --git a/test/integration/no_worker/asset_bundle/generate/generateAllAB_test.re b/test/integration/no_worker/asset_bundle/generate/generateAllAB_test.re index b23476de59..36752d03f7 100755 --- a/test/integration/no_worker/asset_bundle/generate/generateAllAB_test.re +++ b/test/integration/no_worker/asset_bundle/generate/generateAllAB_test.re @@ -24,7 +24,7 @@ let _ = }); afterEach(() => restoreSandbox(refJsObjToSandbox(sandbox^))); - describe("check dependency relation", () => { + /* describe("check dependency relation", () => { describe("if has circle dependency, fatal", () => { testPromise("test1", () => expect(() => @@ -68,7 +68,7 @@ let _ = ); }); - describe("else, not fatal", () => + describe("else, not fatal", () => { testPromise("test1", () => expect(() => GenerateAllABSystem.generate( @@ -82,9 +82,24 @@ let _ = |> not_ |> toThrow |> resolve - ) - ); - }); + ); + testPromise("test2", () => + expect(() => + GenerateAllABSystem.generate( + GenerateAllABTool.buildDependencyRelation([| + [|"s1.sab", "r1.rab", "r2.rab"|], + [|"r1.rab", "r3.rab"|], + [|"r2.rab", "r3.rab"|], + |]), + ([||], [||]), + ) + ) + |> not_ + |> toThrow + |> resolve + ); + }); + }); */ describe("remove duplicate buffer data", () => { describe("remove duplicate buffer data from rab", () => {