Closed larshp closed 3 years ago
I can understand your point in expecting the same file name for a global interface and a global class.
Furthermore, I think adding .global
to the class .abap
files would be incompatible to existing filenames in abapGit with the same content, wouldn't it?
I also talked to a colleague and she told me why she would prefer to keep the addition global
and also discussed the reason why we added the .global
in our initial proposal.
Therefore, just to get the complete picture, let me add this information to this issue:
You mentioned Eclipse. The Eclipse editor for classes consists of 5 tabs (one for the global class, one for local type definitions, one for test classes, ...). To be consistent between these 5 includes we added just the addition for each of these files.
In addition, the global
file is an artificial view on a class, that we introduced to ease the work with source code of a class. Its content is serialised from different includes representing the global class (class-pool, sections and methods).
We didn't add this addition to interfaces, because we don't need the differentiation.
the differentiation is also needed for classes
again, what is the scope of the file format effort?
From my point of view, the goal is not to replicate what is the internal database format of abap artifacts
As a developer, if I want to lookup the source code of a PROG or CLAS or INTF, then the filenaming must be consistent across objects, and not what individual authors prefer
zprog.prog.abap
+ zclas.clas.abap
+ zintf.intf.abap
follow a naming scheme that IMHO is transparent/consistent
zprog.prog.global.abap
+ zclas.clas.global.abap
+ zintf.intf.global.abap
is also
zprog.prog.abap
+ zclas.clas.global.abap
+ zintf.intf.abap
is not
Following the same logic, it shows 5 tabs, then there will 5 individual ABAP files for a class? even though that in 90%(?) of cases the 4 files are not used
also consider sorting, as a developer I'd like to get the most important stuff first, ie. the main definitions or code. I think this should be handled via conventions not luck
Even if it seems a simple decision it took a while to come to the conclusion that we follow the suggestion to remove .global
from the file name for global class sources. Some team members liked the proposal some don't (I added they disadvantages they mentioned in https://github.com/SAP/abap-file-formats/issues/30#issuecomment-884776973 to this issue).
This means the file name for the source code of global class cl_my class will be renamed from cl_my_class.clas.global.abap
to cl_my_class.clas.abap
.
next step = adjust https://github.com/SAP/abap-file-formats/blob/main/file-formats/clas/format.md and the example
reopened as a reminder to align internal implementation
https://github.com/SAP/abap-file-formats/blob/main/file-formats/intf/format.md,
and https://github.com/SAP/abap-file-formats/blob/main/file-formats/clas/format.md
personally I would expect the filename scheme for the main/global ABAP file to be identical for INTF and CLAS objects
When creating and editing in Eclipse, both objects look similar to the developer?
I suggest removing ".global." from the CLAS filename