BartPermentier / al-toolbox

Adds Features to the AL Language Extension
MIT License
13 stars 9 forks source link

Adjust to standard AL regions #20

Closed NKarolak closed 4 years ago

NKarolak commented 4 years ago

Hi Bart,

the AL Language (= runtime ) 6.x has introduced regions itself, but is declaring them differently than you (without comments //). It would be handy if your extension would "disable" itself in runtime 6.x or higher, to let the user use the standard feature

I was also thinking about a command to replace the // #(end)region with #(end)region in runtime 6.0, but since this is really easy using the VS Code search & replace all myself, it's really not necessary.

https://twitter.com/KarolakNatalie/status/1311946641939853312?s=20

BartPermentier commented 4 years ago

Hey,

Thanks for the info! We will make a setting out of it so users can choose per project which one they want to use. Let's not forget the OnPrem's BC13-BC16 who can't use this new feature ;)

NKarolak commented 4 years ago

Let's not forget the OnPrem's BC13-BC16 who can't use this new feature ;)

I don't quite understand. This sounds to me like I wanted your extension to expire in general. Absolutely not the case! :-)

For older target systems (no matter whether SaaS or onPrem), you must specify the correct "runtime" setting in the app.json anyway. The AL Language (version 6.x or higher, does not matter) automatically adjusts its features (downgrades, so to speak) to that. That's why I meant that as soon as runtime 6.x or higher is used in the app.json, your extension can automatically "sleep". The user would not need to interact. I don't know whether this is even possible :-)

BartPermentier commented 4 years ago

Hey,

Version 2.0 of ALTB will let #Regions and //#Regions coëxist. The action that generates Regions will generate them based around the RunTime version of your app. If you do not want to use the Region folding from Microsoft you can disable it in a new setting.

For now snippets with old regions will still use the old folding but we are looking into overhauling all the snippets.

The update should come online soon.

NKarolak commented 4 years ago

Awesome, thank you!