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
744 stars 245 forks source link

Changing SqlDataType does not result in an CodeCop Warning #6496

Closed ChrisBlankDe closed 2 years ago

ChrisBlankDe commented 3 years ago

Title Changing SqlDataType does not result in an CodeCop Warning

Description Changing or setting the SqlDataType Property on an table field does not result in an warning or error from the code cops. since the AppSourceCodeCop check such szenarios (datatype change, field deletion, key modification,..) it should also check if the SqlDataType has changed in an way where a sync would break.

Reason for the rule Its important to get the info about an breaking change at compile time.

qutreson commented 2 years ago

This could be validated as part of AS0036.

qutreson commented 2 years ago

We will align the validation done by AppSourceCop with what is mentioned in the docs for the property: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-sqldatatype-property

It will then be allowed to convert from Varchar and Integer to Variant, any other changes will result in a diagnostic AS0036.

Note that in order to have this validation enabled, you need to setup the AppSourceCop for breaking change validation, see https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/appsourcecop#configuration

JesperSchulz commented 2 years ago

The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 33075 and VS Code Extension Version .

If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo

For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://freddysblog.com/2020/06/25/working-with-artifacts/