ui5-tooling icon indicating copy to clipboard operation
ui5-tooling copied to clipboard

Add support for "flat" library projects

Open RandomByte opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe.

Libraries currently must contain a directory hierarchy representing the library namespace. This is superfluous since the manifest.json already defines the library's namespace.

These directories seem bulky and are probably more likely to have a negative impact on a developer's efficiency than a positive one. Especially when working with command line tools.

Describe the solution you'd like

UI5 Tooling should automatically detect whether a library is "flat" or not. I.e. by searching for a top-level manifest.json.

It can then create a virtual directory structure based on the namespace defined in the manifest.json. In fact, this already happens for application projects.

Describe alternatives you've considered

none

Additional context

none

RandomByte avatar Mar 02 '21 16:03 RandomByte

Just to mention because it is not mentioned explicitely: Also the build result should be flat. Currently library projects produce a nested structure which has to be flattened with an additional task before it is usable for deployments to most stacks.

MatthiasSchmalz avatar Jun 25 '21 08:06 MatthiasSchmalz

@MatthiasSchmalz to me this would be rather a separate and independent feature, right? You should be able to have the sources in a flat structure but still have the same build results as before. And your requirement is independent of the source folder structure.

matz3 avatar Jun 28 '21 06:06 matz3

@matz3, having a flat output that is usable on most stacks has been my main requirement why I have asked for this BI. If this is not part here, please open another one. But I would prefer the feature inside here as well. Currently the build output is not applicable for main stacks (ABAP, CF, Neo,...) and a 3rd party flattener task is needed to make it consumable. Since a deeply nested library only makes sense in some scenarios, this should become the default output structure.

MatthiasSchmalz avatar Jun 28 '21 07:06 MatthiasSchmalz

This is possible with UI5 Tooling v3.0. Libraries no longer need to have a namespace directory structure in src and test 🎉

RandomByte avatar Jun 14 '23 13:06 RandomByte