Skip to content

Commit

Permalink
Fix rendering dependency funtions when loading using minimal graph
Browse files Browse the repository at this point in the history
  • Loading branch information
YannanGao-gs committed Nov 22, 2024
1 parent da82302 commit e0246e8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/fluffy-camels-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@finos/legend-extension-dsl-data-space': patch
---

Fix rendering dependency funtions when loading using minimal graph
3 changes: 3 additions & 0 deletions .changeset/lovely-bulldogs-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
'@finos/legend-server-depot': patch
---
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ export class V1_DSL_DataSpace_PureGraphManagerExtension extends DSL_DataSpace_Pu
}
if (dependencyFunctionInfos.length > 0) {
const dependencyFunctionInfoMap = new Map<string, FunctionAnalysisInfo>();
functionInfos.forEach((funcInfo) => {
dependencyFunctionInfos.forEach((funcInfo) => {
dependencyFunctionInfoMap.set(funcInfo.functionPath, funcInfo);
});
dataSpaceAnalysisResult.dependencyFunctionInfos =
Expand Down
9 changes: 7 additions & 2 deletions packages/legend-server-depot/src/DepotEntityHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import type { StoreProjectData } from './models/StoreProjectData.js';
import type { EntitiesWithOrigin, Entity } from '@finos/legend-storage';
import type { DepotServerClient } from './DepotServerClient.js';
import type { PlainObject } from '@finos/legend-shared';
import type { ProjectVersionEntities } from './models/ProjectVersionEntities.js';

export const retrieveProjectEntitiesWithDependencies = async (
project: StoreProjectData,
Expand Down Expand Up @@ -45,7 +46,7 @@ export const retrieveProjectEntitiesWithClassifier = async (
): Promise<[PlainObject<Entity>[], PlainObject<Entity>[]]> => {
const [entities, dependencyEntities]: [
PlainObject<Entity>[],
PlainObject<Entity>[],
PlainObject<ProjectVersionEntities>[],
] = await Promise.all([
depotServerClient.getEntities(project, versionId, classifier),
depotServerClient.getDependencyEntities(
Expand All @@ -57,5 +58,9 @@ export const retrieveProjectEntitiesWithClassifier = async (
classifier,
),
]);
return [entities, dependencyEntities];

return [
entities,
dependencyEntities.map((e) => e.entities).flat() as PlainObject<Entity>[],
];
};

0 comments on commit e0246e8

Please sign in to comment.