Common classes with JSON library representation
Hi Graham,
Associated classes are our biggest sticking point for moving to git. There are a couple solutions I’ve come up with so far:
1) Move this code to a separate Omnis library
2) Use a git submodule, which lets you merge multiple repositories together into a single working copy
We’re proceeding with option 1, mostly by moving the project-specific classes to separate libraries and leaving the rest in a single core library.
Using submodules would work in theory, but it’s more complicated. The workflow would be:
1) Create a repository for your common code
2) Include this repository in your project as a submodule
3) Export your lib to JSON
4) Copy the common classes into the directory for the common submodule
5) Commit and push your changes
When building out, you would pull remote updates, then copy the common code back into the JSON source for your library. Rebuilt the lbs from the repository and you should be good to go.
The trick is identifying which classes are common and which aren’t. This is one reason we’re just going to split up the project—this identification is easy to express by dividing classes into libraries.
I’ll make a caveat that this is all theoretical—I haven’t tried using the submodules to see if there is a better solution. If someone does find a good way to express the Omnis VCS’ concept of associations in git, please share!
Alex
> On Oct 23, 2017, at 11:41, Graham Stevens <graham.stevens@gmail.com> wrote:
>
> Hi $all,
>
> I realize this question is probably a bit early as most of us aren’t yet using the new JSON library export but I’ll ask it anyway. I probably should have brought it up at EurOmnis but it has only just occurred to me now I am back in the office.
>
> Has anybody put thought into a satisfactory way to handle classes which are common to more than one library/application? We have multiple applications and an infrastructure library of common code in our Omnis VCS. This library’s classes are linked to most of our applications and this works very well in the context of building our libraries from the VCS. But I don’t immediately see an obvious way to handle this in a multiple repository setup like Git. It may just be that I don’t yet have a full understanding of Git but I would appreciate any thoughts you may have on the topic.
>
> Thanks and best regards,
> Graham
>
> PS. It was great to see and catch up with everyone at the conference.
> _____________________________________________________________
> Manage your list subscriptions at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com