larshp / abapmerge

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

Support for dependencies #73

Open sbcgua opened 5 years ago

sbcgua commented 5 years ago

Related to https://github.com/larshp/abapGit/issues/2236

Proposed logic:

P.S. currently pragma include is used for JS/CSS. I think it would fit better for the dependencies. And for JS/CSS pragma can be renamed to inline. Hopefully it is safe ... hopefully noone uses abapmerge yet except AG ... or maybe stick with lib, but I would still rename current include to inline to avoid confusion

larshp commented 5 years ago

which parts to include: why? currently abapmerge merges everything, guess it should be the same with dependencies?

sbcgua commented 5 years ago

I can use just one util class. Or I can include functionality but don't what to include unit tests. Or the package can contain an example-of-usage program. It's just from the top of my head - for sure there can be more scenarios. For sure not all.

I actually think that including all for the main package is also too harsh, but don't have a case yet :) It will certainly come if abapmerge is more widely used

larshp commented 5 years ago

just rm zfile.prog.abap before running abapmerge, with pragmas the source repo will anyhow have to know the objects from the dependency in order to add pragmas

sbcgua commented 5 years ago

But why ? Merging all does not have any benefits, or ? This is just a support heuristic to validate the integrity and quite indirect one by the way - I would better run abaplint over the final file.

Another option is to add abapmerge.json for config of includes. But currently I feel that in-code reference should be better.