abap-file-formats icon indicating copy to clipboard operation
abap-file-formats copied to clipboard

Tooling

Open larshp opened this issue 4 years ago • 11 comments

we can talk about this in the next call

larshp avatar Apr 08 '21 14:04 larshp

Sure ;)

schneidermic0 avatar Apr 09 '21 15:04 schneidermic0

I'm leaning towards defining the data structures in ABAP, example: https://gist.github.com/larshp/a9556931fb454ae372ef045e0ed8b21a (don't look much at the actual fields, but the structure/setup instead)

We are ABAP biased, the purpose and target is ABAP, people defining the data structures will know ABAP.

larshp avatar Apr 20 '21 16:04 larshp

Actually, I like this idea.

schneidermic0 avatar Apr 21 '21 07:04 schneidermic0

First consider the idea, then after that, we can talk about how to practically achieve this 😁

larshp avatar Apr 21 '21 07:04 larshp

Some suggestions discussed,

  • ABAP = source, schema = generated
  • reusability, referencing eg zif_msag=>ty_name
  • self-contained = only ABAP built-in types, no DDIC
  • open development
  • schemas auto generated by CI
  • target language version, 751? as this was where ENUM was introduced
  • ABAP sources are maintained in the format defined by abap-file-formats

larshp avatar Apr 22 '21 13:04 larshp

Just to mention it: As soon as we commit a single line of ABAP source, we have to decide on a serialization format. This is a recursive hen-egg-problem. This is not just about the inner structure (target language version, metadata format) of files but also about file names and directory structures.

Ultimate question is: a) Shall this be agnostic to concrete Git client implementations (abapGit vs. gCTS)? b) Or shall this be readily importable with a concrete client?

Since folder structures of abapGit and gCTS are currently incompatible, (b) would at best work for one concrete client. On the other hand, (a) would not be importable out-of-the-box without additional adaptations, either directly in the import logic of the respective Git clients, or via some "boiler plate" repository that federates the plain files from abap-file-formats into the right folder structure of either abapGit or gCTS...

xtough avatar Apr 23 '21 08:04 xtough

first priority: do the design, not looking at tooling too much

for abapGit we can have changes out to anyone in short time, and also command line git will always work, which enables everyone to use their favorite editor(vscode?)

I started https://github.com/larshp/abap-transmogrify some time ago

larshp avatar Apr 23 '21 08:04 larshp

proof of concept: https://github.com/abap-openapi/abap-type-to-json-schema will now traverse a ABAP structure via RTTI, and runs on both NodeJS and ABAP AS

larshp avatar May 10 '21 04:05 larshp

Cool. We plan to look into the conversion of an ABAP type to Json schema in on of our next sprints as well.

schneidermic0 avatar May 10 '21 12:05 schneidermic0

cool, just note https://github.com/SAP/abap-file-formats/issues/55#issuecomment-824825860

larshp avatar May 10 '21 13:05 larshp

Just adding a link to our ABAP file formats tools repository: https://github.com/SAP/abap-file-formats-tools

It provides ABAP code to generate JSON schema file from an AFF ABAP type.

schneidermic0 avatar Mar 21 '22 09:03 schneidermic0