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
dot abapgit: requirements to other git repositories #217
Comments
or requirements that specific objects must exist in the system |
I'll jump into slack sometime in the coming days to discuss the details but it's been quiet with APM as of lately. Here is a documentation explaining how to use that repository, but it requires an older and custom version of abapGit and was designed with an ecosystem in mind (not using SAP crap as dependencies but just other packages). https://docs.google.com/document/d/1h4o3FpSEafZLJPflGmru2okN1lT1EIYCux_PeUKTJpQ/edit?usp=sharing |
@flaiker suggested that the PINF object can be used for dependency management, this seems like a good idea. A key is needed in order to know if the required repo is installed, the URL will not work as it is changed while forking, plus the URL will not work for offline projects. Add the package interface names in https://github.com/larshp/abapGit/blob/master/docs/repos.json And add required package interfaces in .abapgit.xml |
Overall descriptionIt should be possible to define dependencies for a repository. When a repository is installed it will check that the dependencies are already installed, and help the user installing these if needed. Design considerations
Design suggestionAdd a list of
in the .abapgit.xml file The unique identifier will be used to determine if a dependency is installed or not, ie. it must be persisted along with the repo. Suggestion is to use package interfaces for the unique identifier, eg. ZABAPGIT package interface as part of the abapGit repo. |
Seems good to me! |
It might also be a good idea to combine this functionality with the existing requirement-checks, at least UI-wise so when you are installing a new repository you can see in one dialog what you need to have installed, both repositories and software components. |
Since you propose to be able to track branch/tag, I propose to be able to track also commit. Wouldn't it make more sense to start another project called "abapPackageManger" instead of implementing this feature in "a git client for ABAP"? |
yeah, its not typical to combine the 2 but how will it look? first install abapGit, which then can be used to install the abapPackageManager, which then installs objects via abapGit? Installed repos are listed in abapPackageManager and the same is listed in abapGit. |
What about this:
|
Hi, these were my ideas and notes when I tried creating mine.
I haven't also actually developed any ABAP libraries that had more than a handful of dependencies, or at least I've never built anything that had to deal with multiple level of dependencies either. While it's not automated or even management, might it be an idea to add these details to another file in the repository and then have developers/maintainers indicate which other git libraries are required? |
Keep in mind that if you split up abapGit and abapPackageManager the user needs to keep two repositories up to date to be able to install others instead of just one. |
I can't think of any other programming languages that work in that way though. |
ABAP is a special snowflake ❄️ 😄
abapGit runs on top of the ABAP runtime like nodegit jgit and git2-rs when doing in Package managers also typically manage versions, a user can choose to install a specific version. This is not possible in ABAP, the user will be forced to always choose the latest(development?) version. This is also okay since STMS is used for provisioning. |
Currently, when cloning https://github.com/larshp/abapGitServer into a ABAP system with abapGit, the clone will fail during activation if the dependency https://github.com/larshp/ABAP-Swagger is not already cloned/installed. in a npm similar approach, |
Above is basically the problem I'd like to solve, being able to specify git dependencies. When talking about package management:
|
Maybe as a better example, I don't use npm via git, so I shouldn't be using an apm via abapGit either. I don't publish my
APM forked abapGit and attempted to remove all SAPGUI dependence and to stop registering libraries as git repositories. I used abapGit as the 'installer' behind the scenes because the only way I could make sense of the serializers was to to make use of the ZIP importer class. When importing a library to use for a project, I don't need to know how it's maintained. Same as above, when I import koa or something via npm I can't access the git repository either: Nor will I ever modify the files under /node_modules/ unless I need to debug an issue. If I want to contribute to the koa library, I'd fork it on github and create modifications in my local environment. This also presents a challenge though because I wouldn't be able to work on an alternative version unless I have access to a second server.
Touches on my above point, but in my mind the structure of a ZIP file via abapGit has become for me the 'standard' format for exporting/importing code, though I'd like to have that as seperate functionality that I can use outside of abapGit. |
Yeah, factoring out the layer dealing with objects from abapGit into a separate project that can be used by apm and abapGit would make sense to me. As suggest by @abramsba, the "abap package" can have the format of ZIP archive used by abapGit. |
My 2 cents to add :) I think there really should be some version management. So: Only A assumes latest versions (although it is probably most typical case). For now ... What about future if AG become more widespread... in particular with abap paas... Unique indentifier: just IMHO, should not be any kind of UUID or anything else unreadable. I'd say the URL of original repo (which is saved in-code, not a clone url from metadata) could be a good option. Or path pkgname at dotabap.org. Actually both can be used in some priority (if there is registered dotabap path - good, otherwise direct url to github, like in npm). I think @flaiker meant something similar above (at the beginning). Package manager vs git client. IMHO. From architecture perspective I'd be totally for separation of roles. But indeed abap is special :) abapGit is already a simple package manager - it shows installed packages for all users and manages metadata. Git client is a set of internal classes, not the whole program. Imho from usability perspective it should be one substance. Internally it could be several "modules" to separate the logic and then compiled together with abapmerge. |
I disagree very, very strongly with your post. As a software developer you should be aware of single responsibility, and what people are asking for when they ask for package manager integration in abapGit is bad design.
Sorry if this offends, but I have trouble figuring out if people use this in the sarcastic sense that it's retarded, or if people legitimately use this excuse to justify using software and techniques in an unintended manner because they don't know better or don't want to admit they don't know what they're doing. If trying to coerce a 1980's SQL business programming language into taking on a responsibility it was never originally designed to do (decentralized source code control, 'object oriented programming') is what makes a language special, than ABAP is indeed special. Looking at javascript as an example:
All other platforms manage just find keeping these three responsibilities separate. ABAP doesn't work like Node of course, but why can't the same analogy apply? If the workflow is close enough to the workflow of Node, than Node developers will have a much easier time finding their way in SAP than if they had to also learn the special ABAP sauce that gets thrown on top of everything.
I don't want a bloated monster of git client because SAP developers figured it'd be easy to jam pack three things that don't belong together under a single presentable package. Ideally, as I also said before, I'd already be so much happier if the installer component of abapGit was seperated so that I could even use that without git and have a similar setup and workflow to modern platforms. |
From my point of view, the installer component is separated and can be used without git, abapGit uses this for offline projects. abapGit can be used to move code into a SAP system, How will the installation procedure look like in the above scenario with abapGit and/or apm? abapGit can be used to install apm, or apm to install abapGit, or both installations are separate but somehow share some code? |
According to https://blog.npmjs.org/post/178027064160/next-generation-package-management npm is trying to build it into node itself, so the runtime will contain the package manager. I'm not saying this is a good or bad idea, but something to take from the blog is that they want to make it easier for the developer. |
@abramsba: I cannot say that you're wrong. These are all good points. (and the comment to "abap is special" is fair :) ). But speaking "from helicopter" we need to consider other consequences as well: a) One of AG principles is simple installation. I personally think that this is one of the main reasons why AG managed to get traction. People don't like changes, especially in so corporate env like sap. So copy-paste-run to try is really an advantage. What will happen with this after "splitting"? No, it is solvable! Just need to remember it in the big picture. b) Splitting is good ... but for whom ? Here is a big question ? Imho, it is good for developers. Of abapGit and co-products. From architecture perspective - yes, totally! But for consumer (developer of some other code)? He does not care! He wants to run the UI, press the button, ... magic happens ..., profit! When I install node, I know npm is already there. If the git hadn't been so widespread and universal already, I'm sure, they would have include it to the node distro as well. To be constructive :) OK, let's think, components ...
2.1) Maybe UI and "manager" should also be separate... because now it is not clear what is UI in sap :))))
Does it make some sense ? |
That would be if the package manager functionality was built into, I guess, the kernel. They're still not modifying a git client to extend it's functionality specifically for package management. This can't be though in ABAP (by us in either case), so the comprise here is having the git client also 'install' technical objects which is fetched by getting a compiled version of the client. Ideally, I'd say there would be three individual components of software that can all be obtained individually:
Consider the typical ABAP assignment. Generally we're not asked to create frameworks, but to implement some kind of functional specification for a customer. As long as it works and it's done in the time expected, I don't think it interests most customers how it got there. The majority of my time is spent developing software I will most likely never share for obvious reasons. Using git won't provide me in this scenario any additional benefit nor is it worth the effort to try to get people to use something that's not actually fit for the job. Though, a few people in the team might know of a few handy packages for doing something like a web framework they like using, or something that provides better API's to things like conversion routines. They'll want to get this productive ready package and build their software on top of it. Developers in teams who really like these libraries can also decide to help build the software further. In this case the developer won't be experimenting with the packaged version of the code on the system everybody is working from, but will have their own bald application server or have access to a hobby system of sorts. Instead of installing the package via the package manager, they clone the repository via git, make the changes they see fit, test, and then either merge/pull to their public code repository (not published package). Back to the first example, if they want to use the next version they can either download a ZIP from a global registry or, if allowed by customer, fetch via HTTPS. As a third extreme example, I might even want to use the package manager to SCM. I may be working with a way to generate ABAP code strings and I need a way simply to test and run the objects and be able to remove it later. I may want to use the installer as well for creating code that doesn't need to be versioned or controlled. |
Also see https://github.com/denoland/deno, its a "nodejs" like thingy, but aims to remove npm and the build system, by integrating everything. Packages are loaded directly from URLs |
Hi there, if I my inserts my ideas on this topic. One of the big disatvantage of ABAP (and with this abapgit) is that you can not dowload/save/install a repo if it dependencies (SAP or other z-ojects) are missing in the target system. As in the discussion mentioned there is no real way to solve this problem especially with “only abapgit”. So abapgit cann warn me before install that there might be error cause a/b and f are missing. |
for requirements to a special release there is a feature implemented, see example abapGit/ADT_Backend@0d44288 |
closing, moving to #2236 |
some package manager style functionality?
The text was updated successfully, but these errors were encountered: