Open rvanbekkum opened 6 months ago
It looks like there has been a recent change somewhere and now compiler diagnostics that used to be only visible in the OUTPUT
tab of VS Code are now also visible in the Problems tab.
This would not be a problem for this diagnostic if we had a proper way to suppress it.
Just out of curiosity: When is the warning AL1080 generated?
Can you try to put "suppressWarnings": ["AL1080"]
in your app.json?
Just out of curiosity: When is the warning AL1080 generated?
This diagnostic is raised when you use the resourceExposurePolicies
property in your app.json
file and have allowDebugging
set to true
while having includeSourceInSymbolFile
set to false
.
This can be reproduced with the example app.json
from the original issue description.
Can you try to put
"suppressWarnings": ["AL1080"]
in your app.json?
I can, but that is not what the issue is about and I would rather not apply such a change to tens or hundred of repositories/apps to avoid it from showing up. With this issue I would like to point out a regression in how/where this diagnostic is raised.
By further investigation I found that with previous versions of ALC this diagnostic would only be shown in the OUTPUT tab in Visual Studio Code, but with the latest versions of ALC this behaviour has changed and diagnostics that would previously only be shown in the OUTPUT tab now also seem to be shown as diagnostics on the app.json
file.
(Sidenote: This also happens for diagnostics that are unrelated to the app.json
file though.)
Just out of curiosity: When is the warning AL1080 generated?
This diagnostic is raised when you use the
resourceExposurePolicies
property in yourapp.json
file and haveallowDebugging
set totrue
while havingincludeSourceInSymbolFile
set tofalse
. This can be reproduced with the exampleapp.json
from the original issue description.
And "applyToDevExtension"
must be set to true. I've never seen this warning and we use the same settings (except applyToDevExtension).
Can you try to put
"suppressWarnings": ["AL1080"]
in your app.json?I can, but that is not what the issue is about and I would rather not apply such a change to tens or hundred of repositories/apps [...]
I was just trying to give the Microsoft guys more information on what might be causing this. I just tested it and suppressWarnings
doesn't help either.
There was a bug where these diagnostics were not being emitted to the problems window and it was fixed. Unfortunately, what seems to not have been fixed is that they are not suppressed properly. Thanks for reporting this
Thanks for the feedback. 😊
1. Describe the bug It is not possible anymore to disable diagnostic AL1080 via a
ruleset.json
file. Even though you change the severity of the diagnostic, it will eventually still show up withInfo
severity.2. To Reproduce
Have an AL project with the following
app.json
:ruleset.json
which disables the AL1080 diagnostic for this AL project and configure your project's settings.json to use that ruleset.json file.(You can also set the
action
to something different (e.g.,Warning
): Then initially it will show the diagnostic with the correct severity, but afterwards, it will switch back to showing the diagnostic withInfo
severity.)3. Expected behavior The diagnostic should be suppressed and should not show up as an
Info
diagnostic, like it was before.4. Actual behavior The diagnostic is not suppressed/severity is not changed and stubbornly shows up as an
Info
diagnostic.5. Versions:
Final Checklist
Please remember to do the following:
[x] Search the issue repository to ensure you are reporting a new issue
[x] Reproduce the issue after disabling all extensions except the AL Language extension
[x] Simplify your code around the issue to better isolate the problem
See also: https://www.yammer.com/dynamicsnavdev/threads/2716326117179392