anzwdev / al-code-outline

AL Code Outline for Visual Studio Code
MIT License
51 stars 13 forks source link

Locking long-running saving action #329

Open JavierFuentes opened 2 years ago

JavierFuentes commented 2 years ago

This long-running saving action appears more and more frequently in my project and locks my workflow...

image

I can't even get around it by reloading VSCode... I need to close my project completely and reopen VSCode for it to stop running and lock me...

Is there any setting to avoid it?

Thanks in advance...

PD.- I have this in my project settings.json:

{
    "alOutline.docCommentsType": "none",
    "alOutline.enableCodeCopFixes": true,
    "alOutline.fixCodeCopMissingParenthesesOnSave": true,
    "alOutline.useTableFieldDescriptionAsToolTip": true,
    "alOutline.addToolTipsToPageFields": true,
    "alOutline.pageFieldToolTip": "Especifica el valor del campo %1.",
    "alOutline.pageActionToolTip": "Ejecuta la acción %1.",
    "alOutline.defaultDataClassification": "CustomerContent",
    "alOutline.defaultAppArea": "All",
    "alOutline.defaultListUsageCategory": "Lists",
    "alOutline.fieldsSelectionOrder": "selection order",
    "alOutline.codeActionsOnSave" : [
        "SortProperties",
        "SortVariables",
        "SortPermissions",
        "SortPermissionSetList",
    ],
    "alOutline.codeCleanupActions": [
        "AddApplicationAreas",
        "AddDataClassifications",
        "AddMissingParentheses",
        "AddObjectCaptions",
        "AddTableFieldCaptions",
        "AddToolTips",
        "ConvertObjectIdsToNames",
        "FixKeywordsCase",
        "SortTableFields",
        "SortProperties",
        "SortVariables",
        "SortPermissions",
        "SortPermissionSetList",
        "FormatDocument",
        "TrimTrailingWhitespace",
    ],
}
anzwdev commented 2 years ago

Hi

How big is your project? Try to change "alOutline.enableCodeCopFixes" to false, this setting forces my extension to wait for warnings from Microsoft AL Extension.

JavierFuentes commented 2 years ago

Hi @anzwdev, my project is not too big for now, 96 files, 599KB... a mean of 6,24 KB/file

The bigger file is a custom copy of standard "Combine Shipments" Report with 25KB

I think the blocking process raises on files that are a bit larger like this, but they're only 25KB or less!

I'll try to disable "alOutline.enableCodeCopFixes"...

Thanks again.

JavierFuentes commented 2 years ago

Hi @anzwdev, I made the change you proposed but it doesn't seem to finish solving the problem...

Yesterday I got this other message while editing another custom copy of a standard Report...

image

In addition to keeping the change you proposed, I added the following change in my settings and now it seems that the problem has been solved because the saving is done immediately and my .AL files, I still don't know why, continue to be formatted automatically...

"editor.formatOnSave": false

{
    "editor.formatOnSave": false,
    "editor.snippetSuggestions": "bottom",
    "editor.codeActionsOnSave": {
        "source.fixAll": true
    },
}

I think there must be too many extensions competing to auto-format .AL files and maybe this is part of the problem... I don't know...

anzwdev commented 2 years ago

Hi @JavierFuentes

I've checked my code to be sure, and I can confirm that I am not running document format when actions specified in "alOutline.codeActionsOnSave" setting are run during document saving. It might be worth checking in Task Manager if there is any process using most of your processor power next time you see that dialog telling you that vs code is waiting for extensions to finish.