cross-language-cpp / djinni

A tool for generating cross-language type declarations and interface bindings.
https://djinni.xlcpp.dev
29 stars 2 forks source link

Split repo into multiple projects? #17

Open jothepro opened 4 years ago

jothepro commented 4 years ago

Inspired by @a4z's thoughts I'd like to propose splitting the single repo up into multiple sub-projects to separate the different components into self-contained codebases. This helps clean up the repo structure.

When analysing the current repo I could isolate the following self-contained components:

The main benefits would be:

Downsides & things that need further discussion:

I am looking forward to your thoughts on this wall of text :relaxed:

a4z commented 4 years ago

Thanks a lot for this well through thought summary @jothepro ! excellent!!

Ad downsides, I think we can manage them, and maybe even turn them into strength

so all this is solvable with effort, question is, is it worth the effort , and I think yes. Worst case might be that, until everything is automated, we need to do some things manual, like run examples, but at the end I think it will not be super complicated to have some (thing like) if this than that ....

As mentioned, I was pretty long unsure if it would be worth the work, to split the repos, but seeing your listing, I would vote for yes. Since it makes absolute sense. And it will provide a lot of useful side effects, experimenting with different generator implementations, adding new language bindings, working with just examples ... If we manage to have everything well structured, plus helpers on how to get the parts you need on a machine, it will make much more fun to work with the single components

jothepro commented 4 years ago

FYI I'm starting to experiment with splitting up the repo. The first step is to extract the parster/generator into one repo: https://github.com/jothepro/djinni-generator As soon as I have established some basic integration testing (IDL-file in, generated file out comparision) I am going to propose moving the repo to this organisation.

a4z commented 4 years ago

awesome!

jothepro commented 4 years ago

Update:

Here is my first take on adding integration-tests for the generator: https://github.com/jothepro/djinni-generator/blob/master/src/it/scala/djinni/GeneratorIntegrationTest.scala

It tests if a given djinni-IDL-file produces the expected output. For that I'm calling the cli from within scalaTest and then read the created files from the filesystem & compare them to the expectations, which are stored as files in the repo

I'm not yet finished with the tests and the overall repo structure, but I'd love to hear your feedback about this approach! :)

a4z commented 4 years ago

This looks already pretty good ! Think it is time to start something similar with the support lib

jothepro commented 4 years ago

I want to create the following new repositories in cross-language-cpp:

Other cool stuff may be added in the future, e.g. I am dreaming of djinni-cmake, a neat little support-lib that wraps calling djinni in cmake (see #10)

If you are ok with my proposed structure I will create all repos, fill them with a placeholder Readme that informs about our migration process and open a migration-issue in each project. (Plus I will open my first MR for djinni-generator :muscle:)

Once migration to the new structure is finished, I'd like to move the documentation from djinni-documentation to djinni, overwriting the contents of the current fork. The djinni-repo is then supposed to be the entrypoint that bundles & publishes the documentation & links to the other repos & resources.

I'm sure my proposed repo-list is not yet complete. There still is some things in the repo that I don't know where to put... I guess we'll have to figure that out on the go. :)

All I need for now is your go for my plans, @a4z, @bojanin. If you'd like to contribute in the migration, please tell me on what repository you'd like to help. Let's rock! 🎸

a4z commented 4 years ago

Cool @jothepro , please feel free to make the suggested changes, and thanks a lot for taking initiative and doing the required working steps!