diff --git a/packages/legend-application-studio/src/stores/editor/editor-state/element-editor-state/mapping/MappingElementDecorator.ts b/packages/legend-application-studio/src/stores/editor/editor-state/element-editor-state/mapping/MappingElementDecorator.ts index 0dad7b4f0c8..fca0e345242 100644 --- a/packages/legend-application-studio/src/stores/editor/editor-state/element-editor-state/mapping/MappingElementDecorator.ts +++ b/packages/legend-application-studio/src/stores/editor/editor-state/element-editor-state/mapping/MappingElementDecorator.ts @@ -35,7 +35,7 @@ import { type AggregationAwareSetImplementation, type PropertyMapping, type InstanceSetImplementation, - type TEMPORARY__UnresolvedSetImplementation, + type INTERNAL__UnresolvedSetImplementation, type Mapping, getAllClassMappings, PurePropertyMapping, @@ -652,8 +652,8 @@ export class MappingElementDecorator implements SetImplementationVisitor { } } - visit_TEMPORARY__UnresolvedSetImplementation( - setImplementation: TEMPORARY__UnresolvedSetImplementation, + visit_INTERNAL__UnresolvedSetImplementation( + setImplementation: INTERNAL__UnresolvedSetImplementation, ): void { return; } @@ -799,8 +799,8 @@ export class MappingElementDecorationCleaner } } - visit_TEMPORARY__UnresolvedSetImplementation( - setImplementation: TEMPORARY__UnresolvedSetImplementation, + visit_INTERNAL__UnresolvedSetImplementation( + setImplementation: INTERNAL__UnresolvedSetImplementation, ): void { return; } diff --git a/packages/legend-application-studio/style/components/workspace-setup/_create-project-modal.scss b/packages/legend-application-studio/style/components/workspace-setup/_create-project-modal.scss index 25984444fdb..bc32f70cb12 100644 --- a/packages/legend-application-studio/style/components/workspace-setup/_create-project-modal.scss +++ b/packages/legend-application-studio/style/components/workspace-setup/_create-project-modal.scss @@ -35,25 +35,6 @@ &__workspace { flex-direction: column; } - - &__project-name__input { - flex: 1 0 auto; - background: var(--color-dark-grey-280); - color: var(--color-light-grey-200); - border-radius: 0 0.2rem 0.2rem 0; - height: 3rem; - padding: 1rem; - } - - &__workspace-name__input { - flex: 1 0 auto; - background: var(--color-dark-grey-280); - color: var(--color-light-grey-200); - border-radius: 0 0.2rem 0.2rem 0; - height: 3rem; - padding: 1rem; - margin-top: 1rem; - } } } diff --git a/packages/legend-graph/src/graph-manager/action/changeDetection/DSL_Mapping_ObserverHelper.ts b/packages/legend-graph/src/graph-manager/action/changeDetection/DSL_Mapping_ObserverHelper.ts index 9e6d7729cc1..0a45c1a2566 100644 --- a/packages/legend-graph/src/graph-manager/action/changeDetection/DSL_Mapping_ObserverHelper.ts +++ b/packages/legend-graph/src/graph-manager/action/changeDetection/DSL_Mapping_ObserverHelper.ts @@ -60,7 +60,7 @@ import type { import type { SetImplementationContainer } from '../../../graph/metamodel/pure/packageableElements/mapping/SetImplementationContainer.js'; import type { SetImplementationReference } from '../../../graph/metamodel/pure/packageableElements/mapping/SetImplementationReference.js'; import type { SubstituteStore } from '../../../graph/metamodel/pure/packageableElements/mapping/SubstituteStore.js'; -import type { TEMPORARY__UnresolvedSetImplementation } from '../../../graph/metamodel/pure/packageableElements/mapping/TEMPORARY__UnresolvedSetImplementation.js'; +import type { INTERNAL__UnresolvedSetImplementation } from '../../../graph/metamodel/pure/packageableElements/mapping/INTERNAL__UnresolvedSetImplementation.js'; import type { XStorePropertyMapping } from '../../../graph/metamodel/pure/packageableElements/mapping/xStore/XStorePropertyMapping.js'; import type { PackageableRuntime } from '../../../graph/metamodel/pure/packageableElements/runtime/PackageableRuntime.js'; import { @@ -714,8 +714,8 @@ class SetImplementationObserver implements SetImplementationVisitor { // TODO } - visit_TEMPORARY__UnresolvedSetImplementation( - setImplementation: TEMPORARY__UnresolvedSetImplementation, + visit_INTERNAL__UnresolvedSetImplementation( + setImplementation: INTERNAL__UnresolvedSetImplementation, ): void { return; } @@ -920,6 +920,7 @@ export const observe_Mapping = skipObservedWithContext( _elementHashCode: override, }); + // TODO: create extension mechanism to observe mapping includes when we build editor for this metamodel.includes.forEach(observe_MappingInclude); metamodel.classMappings.forEach((classMapping) => observe_SetImplementation(classMapping, context), diff --git a/packages/legend-graph/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.ts b/packages/legend-graph/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.ts index 0fae842b746..074609cd6cc 100644 --- a/packages/legend-graph/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.ts +++ b/packages/legend-graph/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.ts @@ -149,7 +149,7 @@ import type { SubstituteStore } from '../../../../../../../graph/metamodel/pure/ import { V1_BindingTransformer } from '../../../model/packageableElements/externalFormat/store/V1_DSL_ExternalFormat_BindingTransformer.js'; import { V1_MergeOperationClassMapping } from '../../../model/packageableElements/mapping/V1_MergeOperationClassMapping.js'; import { MergeOperationSetImplementation } from '../../../../../../../graph/metamodel/pure/packageableElements/mapping/MergeOperationSetImplementation.js'; -import type { TEMPORARY__UnresolvedSetImplementation } from '../../../../../../../graph/metamodel/pure/packageableElements/mapping/TEMPORARY__UnresolvedSetImplementation.js'; +import type { INTERNAL__UnresolvedSetImplementation } from '../../../../../../../graph/metamodel/pure/packageableElements/mapping/INTERNAL__UnresolvedSetImplementation.js'; import { isStubbed_EnumValueMapping } from '../../../../../../../graph/helpers/creator/DSL_Mapping_ModelCreatorHelper.js'; import { isStubbed_RawLambda } from '../../../../../../../graph/helpers/creator/RawValueSpecificationCreatorHelper.js'; import { isStubbed_RawRelationalOperationElement } from '../../../../../../../graph/helpers/creator/STO_Relational_ModelCreatorHelper.js'; @@ -1353,8 +1353,8 @@ export class V1_SetImplementationTransformer * * @discrepancy graph-building */ - visit_TEMPORARY__UnresolvedSetImplementation( - setImplementation: TEMPORARY__UnresolvedSetImplementation, + visit_INTERNAL__UnresolvedSetImplementation( + setImplementation: INTERNAL__UnresolvedSetImplementation, ): V1_ClassMapping | undefined { throw new IllegalStateError( `Can't transform unresolved set implementation. This type of set implementation should only show up in references.`, diff --git a/packages/legend-graph/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_PropertyMappingBuilder.ts b/packages/legend-graph/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_PropertyMappingBuilder.ts index 6cfe425dd94..9f1d799d423 100644 --- a/packages/legend-graph/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_PropertyMappingBuilder.ts +++ b/packages/legend-graph/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_PropertyMappingBuilder.ts @@ -82,6 +82,7 @@ import { V1_transformRelationalOperationElement } from '../from/V1_DatabaseTrans import { V1_GraphTransformerContextBuilder } from '../from/V1_GraphTransformerContext.js'; import { getAllEnumerationMappings, + getAllIncludedMappings, getClassMappingById, getClassMappingsByClass, } from '../../../../../../../graph/helpers/DSL_Mapping_Helper.js'; @@ -90,7 +91,7 @@ import type { AbstractProperty } from '../../../../../../../graph/metamodel/pure import { BindingTransformer } from '../../../../../../../graph/metamodel/pure/packageableElements/externalFormat/store/DSL_ExternalFormat_BindingTransformer.js'; import type { Mapping } from '../../../../../../../graph/metamodel/pure/packageableElements/mapping/Mapping.js'; import { V1_resolveBinding } from './V1_DSL_ExternalFormat_GraphBuilderHelper.js'; -import { TEMPORARY__UnresolvedSetImplementation } from '../../../../../../../graph/metamodel/pure/packageableElements/mapping/TEMPORARY__UnresolvedSetImplementation.js'; +import { INTERNAL__UnresolvedSetImplementation } from '../../../../../../../graph/metamodel/pure/packageableElements/mapping/INTERNAL__UnresolvedSetImplementation.js'; import { getAssociatedPropertyClass, getOwnProperty, @@ -103,8 +104,9 @@ import type { V1_FlatDataAssociationPropertyMapping } from '../../../model/packa import { FlatDataAssociationPropertyMapping } from '../../../../../../../graph/metamodel/pure/packageableElements/store/flatData/mapping/FlatDataAssociationPropertyMapping.js'; import type { V1_INTERNAL__UnknownPropertyMapping } from '../../../model/packageableElements/mapping/V1_INTERNAL__UnknownPropertyMapping.js'; import { INTERNAL__UnknownPropertyMapping } from '../../../../../../../graph/metamodel/pure/packageableElements/mapping/INTERNAL__UnknownPropertyMapping.js'; +import { INTERNAL__PseudoMapping } from '../../../../../../../graph/metamodel/pure/packageableElements/mapping/INTERNAL__PseudoMapping.js'; -const TEMPORARY__getClassMappingByIdOrReturnUnresolved = ( +const TEMPORARY__resolveSetImplementationByID = ( mapping: Mapping, id: string, context: V1_GraphBuilderContext, @@ -112,27 +114,34 @@ const TEMPORARY__getClassMappingByIdOrReturnUnresolved = ( const classMapping = returnUndefOnError(() => getClassMappingById(mapping, id), ); + const isMappingWithUnknownMappingIncludes = getAllIncludedMappings( + mapping, + ).includes(INTERNAL__PseudoMapping.INSTANCE); if (!classMapping) { const message = `Can't find class mapping with ID '${id}' in mapping '${mapping.path}'`; /** - * In strict-mode, graph builder will consider this as an error + * If the mapping has unknown mapping includes, this kind of problems + * might be due to the fact that the class mapping is not reachable due to the system + * not knowing how to analyze the unknown mapping include, as such, we will not throw + * errors, otherwise, we should in strict-mode + * * See https://github.com/finos/legend-studio/issues/880 * See https://github.com/finos/legend-studio/issues/941 * * @discrepancy graph-building */ - if (context.options?.strict) { + if (context.options?.strict && !isMappingWithUnknownMappingIncludes) { throw new GraphBuilderError(message); } context.logService.warn(LogEvent.create(message)); - return new TEMPORARY__UnresolvedSetImplementation(id, mapping); + return new INTERNAL__UnresolvedSetImplementation(id, mapping); } return classMapping; }; -const resolvePropertyMappingSource = ( +const resolvePropertyMappingSourceImplementation = ( immediateParent: PropertyMappingsImplementation, value: V1_PropertyMapping, topParent: InstanceSetImplementation | undefined, @@ -140,7 +149,7 @@ const resolvePropertyMappingSource = ( ): SetImplementation | undefined => { if (immediateParent instanceof AssociationImplementation) { if (value.source) { - return TEMPORARY__getClassMappingByIdOrReturnUnresolved( + return TEMPORARY__resolveSetImplementationByID( immediateParent._PARENT, value.source, context, @@ -278,12 +287,11 @@ export class V1_PropertyMappingBuilder const topParent = guaranteeNonNullable(this.topParent); if (propertyType instanceof Class) { if (protocol.target) { - targetSetImplementation = - TEMPORARY__getClassMappingByIdOrReturnUnresolved( - topParent._PARENT, - protocol.target, - this.context, - ); + targetSetImplementation = TEMPORARY__resolveSetImplementationByID( + topParent._PARENT, + protocol.target, + this.context, + ); } else { // NOTE: if no there is one non-root class mapping, auto-nominate that as the target set implementation targetSetImplementation = getClassMappingsByClass( @@ -293,7 +301,7 @@ export class V1_PropertyMappingBuilder } } const sourceSetImplementation = protocol.source - ? TEMPORARY__getClassMappingByIdOrReturnUnresolved( + ? TEMPORARY__resolveSetImplementationByID( topParent._PARENT, protocol.source, this.context, @@ -385,7 +393,7 @@ export class V1_PropertyMappingBuilder const propertyType = property.genericType.value.rawType; if (propertyType instanceof Class && protocol.target) { targetSetImplementation = this.topParent - ? TEMPORARY__getClassMappingByIdOrReturnUnresolved( + ? TEMPORARY__resolveSetImplementationByID( this.topParent._PARENT, protocol.target, this.context, @@ -615,7 +623,7 @@ export class V1_PropertyMappingBuilder } if (protocol.target) { targetSetImplementation = parentMapping - ? TEMPORARY__getClassMappingByIdOrReturnUnresolved( + ? TEMPORARY__resolveSetImplementationByID( parentMapping, protocol.target, this.context, @@ -631,7 +639,7 @@ export class V1_PropertyMappingBuilder } } const sourceSetImplementation = guaranteeNonNullable( - resolvePropertyMappingSource( + resolvePropertyMappingSourceImplementation( this.immediateParent, protocol, this.topParent, @@ -757,12 +765,11 @@ export class V1_PropertyMappingBuilder const parentMapping = this.immediateParent._PARENT; if (protocol.target) { - targetSetImplementation = - TEMPORARY__getClassMappingByIdOrReturnUnresolved( - parentMapping, - protocol.target, - this.context, - ); + targetSetImplementation = TEMPORARY__resolveSetImplementationByID( + parentMapping, + protocol.target, + this.context, + ); } else { targetSetImplementation = getClassMappingsByClass( parentMapping, @@ -771,7 +778,7 @@ export class V1_PropertyMappingBuilder } } const sourceSetImplementation = guaranteeNonNullable( - resolvePropertyMappingSource( + resolvePropertyMappingSourceImplementation( this.immediateParent, protocol, this.topParent, @@ -869,12 +876,11 @@ export class V1_PropertyMappingBuilder InferableMappingElementIdExplicitValue.create(id, ''), undefined, ); - inline.inlineSetImplementation = - TEMPORARY__getClassMappingByIdOrReturnUnresolved( - topParent._PARENT, - protocol.setImplementationId, - this.context, - ); + inline.inlineSetImplementation = TEMPORARY__resolveSetImplementationByID( + topParent._PARENT, + protocol.setImplementationId, + this.context, + ); return inline; } @@ -1043,12 +1049,30 @@ export class V1_PropertyMappingBuilder const _association = xStoreParent.association.value; const property = getOwnProperty(_association, protocol.property.property); const sourceSetImplementation = guaranteeNonNullable( - this.allClassMappings.find((c) => c.id.value === protocol.source), - `Can't find XStore property mapping source implementation with ID '${protocol.source}'`, - ); - const targetSetImplementation = this.allClassMappings.find( - (c) => c.id.value === protocol.target, + resolvePropertyMappingSourceImplementation( + this.immediateParent, + protocol, + this.topParent, + this.context, + ), ); + let targetSetImplementation: SetImplementation | undefined; + const propertyType = property.genericType.value.rawType; + if (propertyType instanceof Class) { + const parentMapping = this.immediateParent._PARENT; + if (protocol.target) { + targetSetImplementation = TEMPORARY__resolveSetImplementationByID( + parentMapping, + protocol.target, + this.context, + ); + } else { + targetSetImplementation = getClassMappingsByClass( + parentMapping, + guaranteeType(propertyType, Class), + )[0]; + } + } const xStorePropertyMapping = new XStorePropertyMapping( xStoreParent, PropertyImplicitReference.create( @@ -1106,12 +1130,32 @@ export class V1_PropertyMappingBuilder propertyMapping?.property ?? this.context.resolveProperty(protocol.property); - const sourceSetImplementation = this.allClassMappings.find( - (c) => c.id.value === protocol.source, - ); - const targetSetImplementation = this.allClassMappings.find( - (c) => c.id.value === protocol.target, + const sourceSetImplementation = guaranteeNonNullable( + resolvePropertyMappingSourceImplementation( + this.immediateParent, + protocol, + this.topParent, + this.context, + ), ); + let targetSetImplementation: SetImplementation | undefined; + const propertyType = property.value.genericType.value.rawType; + if (propertyType instanceof Class) { + const parentMapping = this.immediateParent._PARENT; + + if (protocol.target) { + targetSetImplementation = TEMPORARY__resolveSetImplementationByID( + parentMapping, + protocol.target, + this.context, + ); + } else { + targetSetImplementation = getClassMappingsByClass( + parentMapping, + guaranteeType(propertyType, Class), + )[0]; + } + } const aggregationAwarePropertyMapping = new AggregationAwarePropertyMapping( this.topParent ?? this.immediateParent, diff --git a/packages/legend-graph/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.ts b/packages/legend-graph/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.ts index 2482cbeb8e2..c116541a4d9 100644 --- a/packages/legend-graph/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.ts +++ b/packages/legend-graph/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.ts @@ -215,26 +215,25 @@ export const V1_buildEnumerationMapping = ( }; export const V1_buildMappingInclude = ( - mappingInclude: V1_MappingInclude, + protocol: V1_MappingInclude, context: V1_GraphBuilderContext, parentMapping: Mapping, ): MappingInclude => { - if (mappingInclude instanceof V1_INTERNAL__UnknownMappingInclude) { - return new INTERNAL__UnknownMappingInclude(parentMapping); - } else if (mappingInclude instanceof V1_MappingIncludeMapping) { + if (protocol instanceof V1_INTERNAL__UnknownMappingInclude) { + const metamodel = new INTERNAL__UnknownMappingInclude(parentMapping); + metamodel.content = protocol.content; + return metamodel; + } else if (protocol instanceof V1_MappingIncludeMapping) { const includedMapping = new MappingIncludeMapping( parentMapping, - context.resolveMapping(mappingInclude.includedMapping), + context.resolveMapping(protocol.includedMapping), ); - if ( - mappingInclude.sourceDatabasePath && - mappingInclude.targetDatabasePath - ) { + if (protocol.sourceDatabasePath && protocol.targetDatabasePath) { includedMapping.storeSubstitutions.push( new SubstituteStore( includedMapping, - context.resolveStore(mappingInclude.sourceDatabasePath), - context.resolveStore(mappingInclude.targetDatabasePath), + context.resolveStore(protocol.sourceDatabasePath), + context.resolveStore(protocol.targetDatabasePath), ), ); } @@ -247,14 +246,14 @@ export const V1_buildMappingInclude = ( ).V1_getExtraMappingIncludeBuilders?.() ?? [], ); for (const builder of extraIncludeMappingBuilders) { - const builtInclude = builder(mappingInclude, parentMapping, context); + const builtInclude = builder(protocol, parentMapping, context); if (builtInclude) { return builtInclude; } } throw new UnsupportedOperationError( `Can't transform mapping include: no compatible transformer available from plugins`, - mappingInclude, + protocol, ); }; diff --git a/packages/legend-graph/src/graph/metamodel/pure/packageableElements/mapping/TEMPORARY__UnresolvedSetImplementation.ts b/packages/legend-graph/src/graph/metamodel/pure/packageableElements/mapping/INTERNAL__UnresolvedSetImplementation.ts similarity index 57% rename from packages/legend-graph/src/graph/metamodel/pure/packageableElements/mapping/TEMPORARY__UnresolvedSetImplementation.ts rename to packages/legend-graph/src/graph/metamodel/pure/packageableElements/mapping/INTERNAL__UnresolvedSetImplementation.ts index 0ede607fdf7..4c8e2c5bc22 100644 --- a/packages/legend-graph/src/graph/metamodel/pure/packageableElements/mapping/TEMPORARY__UnresolvedSetImplementation.ts +++ b/packages/legend-graph/src/graph/metamodel/pure/packageableElements/mapping/INTERNAL__UnresolvedSetImplementation.ts @@ -26,16 +26,26 @@ import { /** * When set implementation cannot be resolved by ID, we try to avoid failing graph building - * for now instead, we will leave this loose end unresolved. + * for now instead, we will leave this loose end unresolved. There are a few different cases + * where this could happen: * - * NOTE: this is just a temporary solutions until we make this a hard-fail post migration. + * 1. In Pure, we used to let users define property mappings with source/target set implementation + * pointing at another class mapping from a different mapping, which might not be available in + * the included mapping hierarchy and it would still work, see the following issues for more details: + * See https://github.com/finos/legend-studio/issues/880 + * See https://github.com/finos/legend-studio/issues/941 + * 2. When we handle unknown mapping include, since the mapping include is unknown, we might not be + * able to resolve the underlying mapping and its children class mappings, so like case (1), some + * source/target set implementation might not be resolvable. + * See https://github.com/finos/legend-studio/pull/2242 * - * See https://github.com/finos/legend-studio/issues/880 - * See https://github.com/finos/legend-studio/issues/941 + * While (1) is definitely an anti-pattern, (2) is a fairly valid use case in order for us to properly + * support unsupported + * See https://github.com/finos/legend-studio/issues/315 * * @discrepancy graph-building */ -export class TEMPORARY__UnresolvedSetImplementation extends SetImplementation { +export class INTERNAL__UnresolvedSetImplementation extends SetImplementation { constructor(id: string, parent: Mapping) { super( InferableMappingElementIdExplicitValue.create(id, ''), @@ -48,6 +58,6 @@ export class TEMPORARY__UnresolvedSetImplementation extends SetImplementation { } accept_SetImplementationVisitor(visitor: SetImplementationVisitor): T { - return visitor.visit_TEMPORARY__UnresolvedSetImplementation(this); + return visitor.visit_INTERNAL__UnresolvedSetImplementation(this); } } diff --git a/packages/legend-graph/src/graph/metamodel/pure/packageableElements/mapping/SetImplementation.ts b/packages/legend-graph/src/graph/metamodel/pure/packageableElements/mapping/SetImplementation.ts index f3484085986..c1a4b5c4424 100644 --- a/packages/legend-graph/src/graph/metamodel/pure/packageableElements/mapping/SetImplementation.ts +++ b/packages/legend-graph/src/graph/metamodel/pure/packageableElements/mapping/SetImplementation.ts @@ -30,7 +30,7 @@ import type { InferableMappingElementRoot } from './InferableMappingElementRoot. import type { AggregationAwareSetImplementation } from './aggregationAware/AggregationAwareSetImplementation.js'; import type { InstanceSetImplementation } from './InstanceSetImplementation.js'; import type { MergeOperationSetImplementation } from './MergeOperationSetImplementation.js'; -import type { TEMPORARY__UnresolvedSetImplementation } from './TEMPORARY__UnresolvedSetImplementation.js'; +import type { INTERNAL__UnresolvedSetImplementation } from './INTERNAL__UnresolvedSetImplementation.js'; import type { Class } from '../domain/Class.js'; import type { INTERNAL__UnknownSetImplementation } from './INTERNAL__UnknownSetImplementation.js'; @@ -39,6 +39,9 @@ export interface SetImplementationVisitor { visit_INTERNAL__UnknownSetImplementation( setImplementation: INTERNAL__UnknownSetImplementation, ): T; + visit_INTERNAL__UnresolvedSetImplementation( + setImplementation: INTERNAL__UnresolvedSetImplementation, + ): T; visit_MergeOperationSetImplementation( setImplementation: MergeOperationSetImplementation, @@ -65,9 +68,6 @@ export interface SetImplementationVisitor { visit_AggregationAwareSetImplementation( setImplementation: AggregationAwareSetImplementation, ): T; - visit_TEMPORARY__UnresolvedSetImplementation( - setImplementation: TEMPORARY__UnresolvedSetImplementation, - ): T; } export abstract class SetImplementation diff --git a/packages/legend-graph/src/index.ts b/packages/legend-graph/src/index.ts index 6cd455b8876..6d6092ee93b 100644 --- a/packages/legend-graph/src/index.ts +++ b/packages/legend-graph/src/index.ts @@ -447,7 +447,7 @@ export { JsonModelConnection } from './graph/metamodel/pure/packageableElements/ export { ModelChainConnection } from './graph/metamodel/pure/packageableElements/store/modelToModel/connection/ModelChainConnection.js'; export { XmlModelConnection } from './graph/metamodel/pure/packageableElements/store/modelToModel/connection/XmlModelConnection.js'; export * from './graph/metamodel/pure/packageableElements/mapping/SetImplementation.js'; -export * from './graph/metamodel/pure/packageableElements/mapping/TEMPORARY__UnresolvedSetImplementation.js'; +export * from './graph/metamodel/pure/packageableElements/mapping/INTERNAL__UnresolvedSetImplementation.js'; export { PurePropertyMapping } from './graph/metamodel/pure/packageableElements/store/modelToModel/mapping/PurePropertyMapping.js'; export { InstanceSetImplementation } from './graph/metamodel/pure/packageableElements/mapping/InstanceSetImplementation.js'; export { EnumerationMapping } from './graph/metamodel/pure/packageableElements/mapping/EnumerationMapping.js'; diff --git a/packages/legend-manual-tests/src/__tests__/roundtrip-grammar-mismatch/RoundtripGrammarMismatch.test.ts b/packages/legend-manual-tests/src/__tests__/roundtrip-grammar-mismatch/RoundtripGrammarMismatch.test.ts index 7baed512ba1..f4db4db5683 100644 --- a/packages/legend-manual-tests/src/__tests__/roundtrip-grammar-mismatch/RoundtripGrammarMismatch.test.ts +++ b/packages/legend-manual-tests/src/__tests__/roundtrip-grammar-mismatch/RoundtripGrammarMismatch.test.ts @@ -19,9 +19,7 @@ import { resolve, basename } from 'path'; import fs from 'fs'; import { Core_GraphManagerPreset, - type ClassifierPathMapping, type V1_PureModelContextData, - type SubtypeInfo, } from '@finos/legend-graph'; import { TEST__buildGraphWithEntities, @@ -97,19 +95,7 @@ const checkGrammarRoundtripMismatch = async ( await graphManagerState.graphManager.initialize({ env: 'test', tabSize: 2, - clientConfig: { - baseUrl: ENGINE_SERVER_URL, - }, - TEMPORARY__classifierPathMapping: ( - await axios.get>( - `${ENGINE_SERVER_URL}/pure/v1/protocol/pure/getClassifierPathMap`, - ) - ).data, - TEMPORARY__subtypeInfo: ( - await axios.get>( - `${ENGINE_SERVER_URL}/pure/v1/protocol/pure/getSubtypeInfo`, - ) - ).data, + clientConfig: {}, }); if (options?.debug) { diff --git a/packages/legend-manual-tests/src/__tests__/roundtrip-grammar/RoundtripGrammar.test.ts b/packages/legend-manual-tests/src/__tests__/roundtrip-grammar/RoundtripGrammar.test.ts index ad98655bb45..0efe21c51cc 100644 --- a/packages/legend-manual-tests/src/__tests__/roundtrip-grammar/RoundtripGrammar.test.ts +++ b/packages/legend-manual-tests/src/__tests__/roundtrip-grammar/RoundtripGrammar.test.ts @@ -25,6 +25,7 @@ import { LogEvent, ContentType, HttpHeader, + LOG_LEVEL, } from '@finos/legend-shared'; import { type TEMPORARY__JestMatcher } from '@finos/legend-shared/test'; import { @@ -122,6 +123,9 @@ const checkGrammarRoundtrip = async ( options?: GrammarRoundtripOptions, ): Promise => { const pluginManager = new TEST__GraphManagerPluginManager(); + const logger = new WebConsole(); + logger.setLevel(LOG_LEVEL.ERROR); + // NOTE: This is temporary, when we split the test here and move them to their respective // extensions, this will be updated accordingly // See https://github.com/finos/legend-studio/issues/820 @@ -139,7 +143,7 @@ const checkGrammarRoundtrip = async ( new STO_ServiceStore_GraphManagerPreset(), ], ) - .usePlugins([new WebConsole()]); + .usePlugins([logger]); pluginManager.install(); const log = new LogService(); log.registerPlugins(pluginManager.getLoggerPlugins()); @@ -359,10 +363,7 @@ describe('Grammar roundtrip test', () => { describe('Grammar roundtrip test (without extensions)', () => { test.each(cases)('%s', async (testName, filePath, isSkipped) => { // Mapping include dataspace does not play nicely without extensions as the dependent XStore Associations will fail - if ( - !isSkipped && - basename(filePath) !== 'DSL_DataSpace-mapping-include-dataspace.pure' - ) { + if (!isSkipped) { await checkGrammarRoundtrip(testName, filePath, { debug: false, noExtensions: true,