AppSourceCop Analyser does not find previous Extension version
Describe the bug When you declare a previous extension version in the AppSourceCop.json, the compiler throws 4 identical AS0003 warnings, claiming that the previous version was not found.
To Reproduce Steps and to reproduce the behavior:
- AL:Go!
- Add the AppSourceCop.json with version 1.0.0.0, name and publisher filled out.
- Activate the AppSourceCop in a settings.json file
- Debug the Extension once so that it is installed with version 1.0.0.0
- After stopping the debugger change the app.json version to 1.0.0.1
- Compile the code, compiler should now throw 4 lines of AS0003 warnings.
Expected behavior A check for breaking changes between version concerning the public interfaces of codeunits, for example.
5. Versions:
- AL Language: 4.0.229715
- Business Central: W1 15.2 (Platform 15.0.39461.40546 + Application 15.2.39558.40594)
The app file AppSourceCop should check against must be placed in the .alpackages folder.
Ok then, that worked. In this case either this feature does not work as intended and this is a workaround or the documentation of the configuration of that feature need to be modified:
The name, publisher, version properties are used for specifying a previous version of the current package. AppSourceCop will use this information to download the specified package from the server and compare the current package with it. AppSourceCop will report any breaking changes introduced by the current package. (Emphasis me; Source)
Hi @KoFrank, the app source cop does not automatically download the previous version of the extension. We will fix the documentation for it.
We also updated the diagnostic returned by AS0003 to be a bit more explicit:
The version '{0}' of the extension with publisher '{1}' and name '{2}' could not be found in the package cache folder.
Would that error message have been more helpful?
Hi @qutreson, yes thank you. That error message would be more helpful.
Perfect, I am then closing this issue. This fix will be available in the next release of the AL extension and should be available soon in our developer previews.