HodorNV / ALOps

ALOps
59 stars 24 forks source link

[Feature Request] ALOps - Compile: override global preprocessor symbols in app #568

Closed PeterConijn closed 1 year ago

PeterConijn commented 2 years ago

Is your feature request related to a problem? Please describe. We set up a build pipeline for an app based on the latest OnPrem version in order to catch compilation errors early on. One problem we are running into is that there is a compile error on a field that we added on a page-extension, but that Microsoft now added on the page.

We usually catch that by using preprocessor symbols in the app.json to phase out the field. Our app.json contains the following line:

"preprocessorSymbols": ["DW119"],

And then, in the page extension in question:

#if DW119
            field("Gen. Prod. Posting Group"; Rec."Gen. Prod. Posting Group")
            {
                ApplicationArea = All;
                ToolTip = 'Specifies the item''s product type to link transactions made for this item with the appropriate general ledger account according to the general posting setup.';
            }
#endif

The idea is that when we move to a higher BC base, the preprocessorSymbol tag is updated to reflect the new reality. However, while the build in our currently supported BC version (19.0) works, the latest build pipeline fails since I cannot find a way to replace/remove the preprocessor symbols in the app.json.

Describe the solution you'd like If not already present (and I missed it), I would like the ALOps - Compile functionality to add an option to keep or redefine the global preprocessor symbols in the app.json.

Describe alternatives you've considered In this case I could have simply renamed the page control and it would have worked, but that is just solving a symptom. In case code is altered between versions this approach would not work.

waldo1001 commented 2 years ago

Makes sense.

Do know, you could do this today with simply creating a copy of the app.json to for example "app.DW119.json" and refer to it in the compile-step .. .

AdminHodor commented 2 years ago

Please check our latest release v1.453 for this feature.