Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Format for DDLS (CDS Data Definitions) #160

Merged
merged 7 commits into from
Aug 13, 2021
Merged

File Format for DDLS (CDS Data Definitions) #160

merged 7 commits into from
Aug 13, 2021

Conversation

BeckerWdf
Copy link
Contributor

No description provided.

Copy link
Contributor

@Christopher-Hermann Christopher-Hermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably one point has to be addressed by us.

file-formats/ddls/ddls.json Outdated Show resolved Hide resolved
file-formats/ddls/ddls.json Outdated Show resolved Hide resolved
@larshp
Copy link
Collaborator

larshp commented Aug 13, 2021

A: as a generic issue, we need to consider what the filename extensions should be, I dont think ".cds" is currently used anywhere?
B: I have mixed thoughts about the BASEINFO
C: generic issue #115, baseinfo is not a LIMU subobject? If its json, then it can go into the main json file, instead of having multiple files?

@BeckerWdf
Copy link
Contributor Author

A: as a generic issue, we need to consider what the filename extensions should be, I dont think ".cds" is currently used anywhere?
But .abap would be wrong. The language is cds. What's your proposal?
B: I have mixed thoughts about the BASEINFO
We don't need this for the review use-case but will need it for the "import" use-case.
C: generic issue #115, baseinfo is not a LIMU subobject? If its json, then it can go into the main json file, instead of having multiple files?
As we don't need it for code review we implemented it as a separate file so that reviewers can simply ignore the complete file instead of skipping some attributes in the main json file.

@schneidermic0
Copy link
Contributor

B: I have mixed thoughts about the BASEINFO
We don't need this for the review use-case but will need it for the "import" use-case.

The .objectdependencies.json file (BASEINFO) might be related to issue #131. Does anybody know, whether abapGit, as of today, uses the information stored in the .objectdependencies.json file?

@larshp
Copy link
Collaborator

larshp commented Aug 13, 2021

@larshp
Copy link
Collaborator

larshp commented Aug 13, 2021

A: Currently,

@larshp
Copy link
Collaborator

larshp commented Aug 13, 2021

C: its a generic issue, personally I'd like fewer files, everything will show up as changes anyhow

@BeckerWdf
Copy link
Contributor Author

Currently,

Let's look how ABAP classes do it. ADT uses .aclass but in this repo classes use .abap

@schneidermic0
Copy link
Contributor

abapGit, yes, it uses baseinfo today: https://github.com/abapGit/abapGit/blob/main/src/objects/zcl_abapgit_object_ddls.clas.abap#L236

Then, most probably, the baseinfo is not related to #131.

@schneidermic0
Copy link
Contributor

If possible, I personally would also prefer something like .cds or .ddls instead of .asddls.

In ADT the file extensions have to be unique per object type to open the correct editor. Therefore, we were not able to use just .abap, there.

@BeckerWdf Which file extensions would you use for access controls (DCLS), metadata extension (DDLX), and so on? Would it be the same as for DDLS or a different, because we need other syntax colouring, parsing etc...?

@BeckerWdf
Copy link
Contributor Author

BeckerWdf commented Aug 13, 2021

@BeckerWdf Which file extensions would you use for access controls (DCLS), metadata extension (DDLX), and so on? Would it be the same as for DDLS or a different, because we need other syntax colouring, parsing etc...?

Yes we need another parser but still the language is cds. We would have:

  • .ddls.cds
  • .dcls.cds
  • .ddlx.cds

So we know if we need to utilise the ddls, dcls or ddlx parser. And there may be other cds implementations that can understand ddls, dcls and ddlx in one parser.

Copy link
Contributor

@Christopher-Hermann Christopher-Hermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@larshp
Copy link
Collaborator

larshp commented Aug 13, 2021

The .cds extension does look nicer, but note the impact on the ecosystem

https://cap.cloud.sap/docs/cds/ is the "Language Reference Documentation" for CDS?

But is this the same CDS we are looking for?

If .cds files can have different languages, it can be difficult for syntax highlighters to implement. As of right now there are no "ABAP CDS" .cds files in the wild

@BeckerWdf
Copy link
Contributor Author

If .cds files can have different languages, it can be difficult for syntax highlighters to implement. As of right now there are no "ABAP CDS" .cds files in the wild

So what would you prefer? .ddls or .ddls.ddls? First one would be different as the other object types have .. Second one looks a bit strange because and are identical.

@larshp
Copy link
Collaborator

larshp commented Aug 13, 2021

I dont really have a good overview

Is ABAP flavored CDS a subset or superset of the other CDS?

But .acds could be an option, if its ABAP flavored CDS/ABAP specific CDS

@BeckerWdf
Copy link
Contributor Author

Is ABAP flavored CDS a subset or superset of the other CDS?

Let's merge this PR and discuss this in #161

@BeckerWdf
Copy link
Contributor Author

Formatting the (.objectdependencies.)json would increase the readability.
Let's merge this PR and work on this in #163

@BeckerWdf BeckerWdf merged commit 9840966 into main Aug 13, 2021
@BeckerWdf BeckerWdf deleted the ddls branch August 13, 2021 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants