larshp / abapmerge

Merge ABAP classes/interfaces/INCLUDEs into single file
MIT License
24 stars 14 forks source link

wip: resolve pargmas as Pre-Processor #376

Open filak-sap opened 1 year ago

filak-sap commented 1 year ago

The newly added CUA include into a local implementations has caused me some headaches. I wanted to do the single file merge but that does not work because we need to load the global class.

I used to be a C/C++ programmer and we used to stop compilation after preprocessing (gcc -E) - it replaces all macros and so on.

I consider all abapmerge pragmas as macros on steroids and thus stopping after processor makes sense to me.

I am not sure about how to save the results.

I had to pass a full file path in the ctor of "File" and I split it into dir and file in the constructor. However, that broke tests because you add "js/script.js" and then include it as "js/script.js" but when processing an abapGit repository, you ignore directory (so I had to enhance getOtherByName a little bit). Do you ever include files with directory in the name?

Your thoughts?