-
Notifications
You must be signed in to change notification settings - Fork 4
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
RiveScript Monolithic Version Control #1
Comments
I think this unnecessarily raises the level of complexity too much to be helpful. The biggest wall it'll create is in collaboration with other developers. And to address the file structure of the Go implementation - I'm very much a fan of keeping all my code within a If you take a look at my PHP implementation, you'll find a structure like the following:
|
With Go, the project structure becomes a more important problem because of the tight coupling between repository URLs (and therefore structure) and the packages in them. To put the bulk of the source code into a With the current layout, Unit tests in Go become a whole other can of worms. It's possible to put the tests into a separate Some ideas I have that could help me with the Go codebase without going to a mono-repo:
|
RiveScript may be able to benefit from having a monolithic version control repository rather than having one repo per implementation (Perl, Python, JavaScript, Go and Java). It could also encompass and make obsolete the other closely related repos: rivescript-wd and rsts.
High Level Rationale
This would involve a temporary disruption for third party contributors as the repos get rearranged and all the implementations are migrated into the common
aichaos/rivescript
repo. But the benefits gained from having a common repository for all implementations may include:Adding a new feature to RiveScript as a whole can be made easier. For example, if I'm adding a new command to the language, I can have all 5 implementations get the update simultaneously with one GitHub pull request.
The current state of affairs is that I would have to sit down all at once, clone all 5 repositories and deal with the overhead of making the changes and pull requests separately for each version. This is such an obstacle that I haven't added a new global feature to RiveScript in quite a while, because I don't want the published module versions to diverge from each other for any length of time.
Unit tests can be consolidated and kept in sync across all versions. Currently, each implementation has their own copies of unit test fixtures in their own repo so that Travis CI can run tests on push, and there is also the aichaos/rsts project which provides YAML test fixtures for the RiveScript language itself.
Currently a lot of the YAML fixtures in rsts are duplicated from the tests in the individual implementations. And currently a lot of the implementations fail the RSTS test suite due to random little quirks in their implementations (for example, the exact wording they use for error messages).
A mono-repo could bring the YAML fixtures from RSTS into the repo and all the unit tests can become RSTS tests, so that they are all kept in sync at all times and it will be easier to iron out their little quirks to all behave identically. And it's friendly for Travis CI which can still run automated unit tests.
I can make more use of GitHub features like Projects and Wikis. Currently most of the repos don't have wikis enabled until I have a repo-specific need for them (i.e., for the JavaScript version to document the Async issues that come up frequently in that project).
If all the RiveScript implementations are merged together into the
aichaos/rivescript
project, the existing RiveScript Community Wiki can be merged with the random odd pages from the projects' own wikis.Impact
Impact on Contributors
Having a single repo containing 5 different programming language implementations may deter contributions from developers who are only familiar with a subset of those languages: if they fix or change a behavior, the unit tests might pass for the language they modified but fail for the ones they didn't.
This may be somewhat alleviated by using the Git Flow workflow and have the
master
branch be the "production ready" one where all unit tests are passing and all builds are stable.All pull requests would instead be directed at the
develop
branch which is allowed to fail tests from time to time. So if a contributor fixes the JavaScript implementation and breaks the other four, those can be patched by others (or me) later before the next production-ready merge tomaster
can be done.Impact on Implementations
The Perl, Python, Java and JavaScript implementations shouldn't be affected too much, as their GitHub URLs aren't very important in those languages. Their links on e.g. npm and PyPI would just be updated to point to the mono-repo.
The Go version would need to get a new module name, since Go ties the GitHub source address to the module's name by default. Options may include:
On a bright note: I've been struggling with the code layout in
rivescript-go
because I don't like a large number of Go source files cluttering up the root of the repo alongside the meta files likeREADME.md
,Changes.md
and.travis.yml
; as such I kept the majority of the source code (with the tons of unit tests) under asrc/
subdirectory and created a wrapper API in the root of the repo instead.If the Go source for RiveScript were kept at
aichaos/rivescript/go
, then the/go
directory can replace thesrc
one and all the Go source files can be kept in a sane place together. The root of the repo, having nothing to do with the Go specific implementation, can contain only meta files and no program code at all.This would simplify the Go API as much as I've been wanting.
Impact on Travis CI
The root of the repo could probably add a Makefile for Travis CI to use which would handle the necessary logic to run through the unit tests on each implementation.
The text was updated successfully, but these errors were encountered: