@sap/cds-compiler 6.6.0 → 6.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -1
- package/bin/cdsc.js +2 -0
- package/bin/cdsse.js +1 -1
- package/lib/base/message-registry.js +6 -7
- package/lib/base/model.js +0 -72
- package/lib/checks/elements.js +1 -1
- package/lib/checks/featureFlags.js +2 -2
- package/lib/compiler/assert-consistency.js +3 -4
- package/lib/compiler/base.js +8 -0
- package/lib/compiler/builtins.js +8 -9
- package/lib/compiler/checks.js +27 -6
- package/lib/compiler/cycle-detector.js +4 -4
- package/lib/compiler/define.js +65 -83
- package/lib/compiler/extend.js +357 -325
- package/lib/compiler/finalize-parse-cdl.js +3 -4
- package/lib/compiler/generate.js +205 -203
- package/lib/compiler/kick-start.js +34 -49
- package/lib/compiler/populate.js +95 -28
- package/lib/compiler/propagator.js +3 -5
- package/lib/compiler/resolve.js +17 -13
- package/lib/compiler/shared.js +47 -19
- package/lib/compiler/tweak-assocs.js +2 -4
- package/lib/compiler/utils.js +84 -31
- package/lib/gen/BaseParser.js +924 -1055
- package/lib/gen/CdlGrammar.checksum +1 -1
- package/lib/gen/CdlParser.js +5 -2
- package/lib/json/from-csn.js +25 -16
- package/lib/main.d.ts +13 -0
- package/lib/model/revealInternalProperties.js +18 -0
- package/lib/parsers/AstBuildingParser.js +22 -5
- package/lib/render/toHdbcds.js +2 -2
- package/lib/render/utils/sql.js +2 -2
- package/lib/render/utils/standardDatabaseFunctions.js +2 -2
- package/lib/transform/db/constraints.js +3 -4
- package/lib/transform/db/killAnnotations.js +1 -1
- package/lib/transform/db/processSqlServices.js +10 -11
- package/lib/transform/effective/associations.js +1 -1
- package/lib/transform/forOdata.js +7 -124
- package/lib/transform/odata/fioriTreeViews.js +173 -0
- package/lib/transform/odata/flattening.js +2 -2
- package/lib/transform/translateAssocsToJoins.js +7 -4
- package/package.json +1 -1
- package/share/messages/message-explanations.json +0 -2
- package/share/messages/type-unexpected-foreign-keys.md +0 -52
- package/share/messages/type-unexpected-on-condition.md +0 -52
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
'use strict';
|
|
15
15
|
|
|
16
16
|
const { CompilerAssertion } = require('../base/error');
|
|
17
|
-
const { forEachGeneric } = require('
|
|
17
|
+
const { forEachGeneric } = require('./utils');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
// Used for resolving types in parseCdl mode.
|
|
@@ -27,7 +27,6 @@ function finalizeParseCdl( model ) {
|
|
|
27
27
|
const {
|
|
28
28
|
resolveUncheckedPath,
|
|
29
29
|
resolveTypeArgumentsUnchecked,
|
|
30
|
-
initMembers,
|
|
31
30
|
} = model.$functions;
|
|
32
31
|
|
|
33
32
|
resolveTypesAndExtensionsForParseCdl();
|
|
@@ -41,8 +40,6 @@ function finalizeParseCdl( model ) {
|
|
|
41
40
|
for (const name in late) {
|
|
42
41
|
for (const ext of late[name]._extensions) {
|
|
43
42
|
ext.name.id = resolveUncheckedPath( ext.name, '_uncheckedExtension', ext );
|
|
44
|
-
// Initialize members and define annotations in sub-elements.
|
|
45
|
-
initMembers( ext );
|
|
46
43
|
extensions.push( ext );
|
|
47
44
|
}
|
|
48
45
|
}
|
|
@@ -66,6 +63,8 @@ function finalizeParseCdl( model ) {
|
|
|
66
63
|
* @param {XSN.Artifact} main
|
|
67
64
|
*/
|
|
68
65
|
function resolveTypesForParseCdl( artifact, main ) {
|
|
66
|
+
// TODO: use `artifact` as "user" for resolveUncheckPath (now that the _block
|
|
67
|
+
// links of expand/inlines etc are correctly set)
|
|
69
68
|
if (!artifact || typeof artifact !== 'object')
|
|
70
69
|
return;
|
|
71
70
|
|