microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
728 stars 241 forks source link

XMLports: Typing (but not pasting) properties like TransactionType, TextEncoding produces spurious warning that "'schema' cannot be used in this context" #6232

Open dzzzb opened 3 years ago

dzzzb commented 3 years ago

equivalent to #6225 but for XMLports instead of Reports.

Describe the bug Typing TransactionType = [whatever]; creates a spurious error about schema not being valid/expected. The same goes for TextEncoding and possibly others. I didn't check more: this is simply a bug that needs to be fixed at the source, for all properties.

To Reproduce Steps and to reproduce the behavior:

  1. Create an XMLport
  2. Put an schema{} in it
  3. Go up to and type a TransactionType = Update; (e.g.) before the schema, in the object properties area.

Interestingly, I can then cut and paste that line with the vim keybindings, and the error goes away (a) when it's cut obviously and (b) even after it's pasted back in the same form.

I also do not see this error when I type e.g. TransactionType=Update; i.e. without spaces and the auto-formatted runs and puts the missing spaces in; that's OK.

Expected behavior This is not an error, as the ability to cut and paste the same code and get no error proves... so it should never be (sometimes) reported as one!

Screenshots

after adding the line by typing it: image

after cut/paste: image

5. Versions:

dzzzb commented 3 years ago

just to confirm, still occurring

dzzzb commented 2 years ago

Still a problem:

image

Name: AL Language
Id: ms-dynamics-smb.al
Description: AL development tools for Dynamics 365 Business Central
Version: 8.3.570094
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-dynamics-smb.al