Skip to content

Commit

Permalink
Add instructions, how to develop and test new features across multipl…
Browse files Browse the repository at this point in the history
…y repositories
  • Loading branch information
Mingun committed Feb 2, 2020
1 parent 7e53bea commit ad1e2bf
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion developers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,55 @@ actually be JavaScript libraries, not Java jars.
. Go to https://oss.sonatype.org/#stagingRepositories
. Continue to follow Java runtime publishing instructions

== Developing new feature

Because the tests are in your own repository, you must clone the test repository
to test your work. To do this with one command, there is a `kaitai_struct` repository
that contains submodules for all other project repositories. You can just clone it
with submodules.

If you have already clone the individual repository, you can just add new remote
to submodule pointed to repository with your work. See example:

[source,shell]
# Clone uber-repository
git clone --recursive https://github.com/kaitai-io/kaitai_struct.git
cd kaitai_struct
#
# Select subproject you want to modify
cd ${sub-project}
# See current status
git remote -v
# Add your repository as remote with name my-repo
git remote add ${my-repo} https://github.com/${my-repo}/${sub-project}.git
# Check youself
git remote -v
# Get you work
git fetch ${my-repo}
# or, if you want to fetch only one branch `my-feature`. Use local branch name,
# without repository name prefix, ie. just `some-feature` but not `my-repo/some-feature`
# git fetch ${my-repo} ${my-feature}
#
# Switch to you feature branch
git checkout ${my-feature}

== Tests

TODO
To test changes in compiler and runtimes, run following commands (for example, for
Java runtime):
[source,shell]
# Assumed, that this will be done
# git clone --recursive https://github.com/kaitai-io/kaitai_struct.git
# cd kaitai_struct
cd tests
./build-compiler
# Convert all test `.ksy` files into all target languages (including Java),
# which will give you tests/compiled/java
./build-formats
# will run all tests for Java; results will be in `test_out/java`
./run-java

Also, see readme of https://github.com/kaitai-io/kaitai_struct_tests project.

== Runtimes

Expand Down

0 comments on commit ad1e2bf

Please sign in to comment.