Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppSourceCop fails on AS0004 change from __MissingTypeSymbol__ to X #7876

Open
4 of 6 tasks
joandrsn opened this issue Oct 21, 2024 · 1 comment
Open
4 of 6 tasks
Labels
AppSourceCop This is a specific static-code-analysis group (AS) requires-triage

Comments

@joandrsn
Copy link
Contributor

1. Describe the bug
AppSource fails when compiling against my version. I suspect it has to do with usage of implicit namespaces with AppSourceCop compiles for the object change type.

2. To Reproduce
Steps to reproduce the behavior:

  1. Create a simple AL-project with AppSourceCop enabled and using a Base-app enum (or other type in the Base-app).
  2. Compile the version
  3. Move the compiled version to AppSourceCop folder
  4. Recompile

3. Expected behavior
AppSourceCop to succeed, since I have made no breaking change to the AL-project.

4. Actual behavior
Compilation fails with the following error:

MyTable.Table.al(12,18): error AS0004: Field 'Document Type' has changed type from '__MissingTypeSymbol__' to 'Enum Microsoft.Sales.Document."Sales Document Type"'. Type changes are not allowed.

5. Versions:

  • AL Language: 14.1.18.1238
  • Visual Studio Code: 1.94.0
  • Business Central: 24.5
  • List of Visual Studio Code extensions that you have installed:
  • Operating System:
    • Windows
    • Linux
    • MacOS

Final Checklist

Please remember to do the following:

  • Search the issue repository to ensure you are reporting a new issue

  • Reproduce the issue after disabling all extensions except the AL Language extension

  • Simplify your code around the issue to better isolate the problem

Additional information

I have created the following example:
https://github.com/joandrsn/AppSourceCop-Example

The example should be able to reproduce the error by simply compiling. I have done step 1-3 of the reproduce steps.
The error may be caused by the project not using namespaces and utilizing the base-app objects.
I am open to suggestions how to fix the issue, however, this example is rather small. In our actual project, we have 22 warnings and 86 errors.

@nndobrev nndobrev added AppSourceCop This is a specific static-code-analysis group (AS) requires-triage labels Nov 6, 2024
@iti-mikolaj-sledz
Copy link

We have a similar problem when running Run-ALCops for our app, but with a table extension that hasn’t been changed for several releases. The issue only occurs on version 23; it does not occur on higher versions of Business Central.

##[error]./C:/ProgramData/BcContainerHelper/e739898c-0903-4e6c-a952-9c7241ecd6db/src/src/tableextension/XXXSourceCodeSetup.TableExt.al(1,25): error AS0068: The target table of table extension 'XXX Source Code Setup' has changed from 'MissingTypeSymbol' to 'Source Code Setup'. Changing the target of a table extension that has been published is not allowed, because this might break the upgrade of existing installations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AppSourceCop This is a specific static-code-analysis group (AS) requires-triage
Projects
None yet
Development

No branches or pull requests

3 participants