cancel
Showing results for 
Search instead for 
Did you mean: 

CDS code formatting when default value ''

tse-gdo
Explorer
0 Kudos

Your environment (run the following commands):

  • SAP CDS Launguage support v4.5.2
  • @sap/audit-logging: 3.2.0
  • @sap/cds: 4.4.9
  • @sap/cds-compiler: 1.46.6
  • @sap/cds-dk: 4.8.2
  • @sap/cds-foss: 2.2.0
  • @sap/cds-odata-v2-adapter-proxy: 1.6.2
  • @sap/cds-reflect: 2.13.4
  • @sap/cds-runtime: 2.7.8
  • @sap/hana-client: 2.7.16
  • @sap/xsenv: 2.2.0
  • @sap/xssec: 2.2.5
  • node 14.18.3

Steps to reproduce:

  1. Create a cds file in db or srv folder
  2. Define an entity and define a default value ''
  3. Everything after the '' is incorrectly code-formatted as a string and auto-complete does not work

Additional information (if applicable):

  • If a space is added between the '', everything is works as normal
  • This is also the same problem when adding fields on projections ('' as field

Accepted Solutions (1)

Accepted Solutions (1)

christian_fuchs1
Employee
Employee
0 Kudos

This should be fixed with vscode-cds 4.5.3. Will be on VSCode Marketplace in the coming days. Until then, install the file via `npm i @sap/vscode-cds` and pick the VSIX from `node_modules/@sap/vscode-cds/vscode-cds-4.5.3.vsix` and install it manually.

Best regards
Christian

tse-gdo
Explorer
0 Kudos

Thank you. Version v4.5.3 now on marketplace and working as expected.

Answers (0)