DavidFeldhoff / al-codeactions

MIT License
17 stars 8 forks source link

Extract to Procedure unavailable in larger projects #163

Closed tscottjendev closed 10 months ago

tscottjendev commented 11 months ago

the Extract to Procedure is unavailable in a multi-root workspace with ~300 objects and 10 apps. If I open the folder for one of the apps is works but if I open the workspace it does not work. I don't understand why "size" matters in this scenario.

AL Language extension v11.7.863928 AL CodeActions v1.0.29

DavidFeldhoff commented 11 months ago

Can't explain that to me as well honestly :D Do you have something in the "Output" -> "Extension Host" window when you try to do the Extract procedure command?

tscottjendev commented 11 months ago

So if I open the workspace, I don't get Extract to procedure

https://github.com/DavidFeldhoff/al-codeactions/assets/102963427/bbaf1c58-d80b-49a2-bb30-115895ab0cf8

If I open the folder rather than the workspace I get Extract to Procedure

https://github.com/DavidFeldhoff/al-codeactions/assets/102963427/b53fd2fc-d722-458a-82ea-d5498cf43cab

Nothing shows in the Extension Host that I see as relevant image

DavidFeldhoff commented 11 months ago

Thanks for the videos. Unfortunately, I've still no clue what it might be. I see that other users are having similar issues which might be related in #164, but for me it's working like a charm. Is it just the Extract to procedure that's not working? Are other functions like Create Procedure working? What I could do then is adding more logging-commands to the Extract to procedure command (if it's just that command) to get a glimpse of what's happening.

DavidFeldhoff commented 11 months ago

Short update: I could finally reproduce it. Now trying to find a solution..

tscottjendev commented 11 months ago

Happy to do a screen share with you if that would help.

DavidFeldhoff commented 10 months ago

I think I found the issue together with Andrzej. It might happen if there is a folder in the workspace which does not have an app.json, can you confirm that? If that's the case, Andrzej (AZ AL Dev Tools) is fixing it on his site.

tscottjendev commented 10 months ago

Yes, that is the case (PowerShell scripts, .algo, and .alpackages folders). If I remove these and reload the workspace then the Extract to Procedure works again. Please note that these folders are pretty standard in our workspaces and I am pretty certain this has not been an issue until recently.

DavidFeldhoff commented 10 months ago

Yes, I agree that it has to work with it. It'll be fixed with the upcoming release of AZ AL Dev Tools/AL Code Outline (the one after v3.0.50). I saw that Andrzej already fixed it on his site and just has to release it. Let's wait a bit for that and then I assume that it's working again 👍

fvet commented 10 months ago

@DavidFeldhoff Will it fix similar issues for the "Add OnBefore/OnAfter publisher" on procedures as well? This seems to be broken as well

DavidFeldhoff commented 10 months ago

Yes, it's unfortunately a function that I'm using pretty often, to not say in almost all my functions. Extract to Label and so on is also not working anymore. I'll reach out to Andrzej again and ask him when he plans to release his change which is already pushed to his master branch. If he needs more time for testing or wants to add more things, then I'll make a quick fix tomorrow. Sorry for the inconvenience.

DavidFeldhoff commented 10 months ago

I decided to do the fix on my site now. The release v1.0.30 should be working fine again entirely. Would be happy if you could confirm that.

tscottjendev commented 10 months ago

Initially testing looks good! Thank you for your attention to this. Especially when you have other priorities and this is a distraction from those.

DavidFeldhoff commented 10 months ago

Great, thanks for confirming and also for not taking it for granted :) Last half year my priorities were just somewhere else ✌️ I'm going to close this issue now. If something's still open after more testing feel free to reopen this one or create a new one.