Skip to content

Commit c908bae

Browse files
committed
Add instructions, how to develop and test new features across multiply repositories
1 parent c87ae4c commit c908bae

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

developers.adoc

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,55 @@ credentials += Credentials(Path.userHome / ".sbt" / ".credentials")
221221
. Go to https://oss.sonatype.org/#stagingRepositories
222222
. Continue to follow <<java,Java runtime publishing instructions>>
223223

224+
== Developing new feature
225+
226+
Because the tests are in your own repository, you must clone the test repository
227+
to test your work. To do this with one command, there is a `kaitai_struct` repository
228+
that contains submodules for all other project repositories. You can just clone it
229+
with submodules.
230+
231+
If you have already clone the individual repository, you can just add new remote
232+
to submodule pointed to repository with your work. See example:
233+
234+
[source,shell]
235+
# Clone uber-repository
236+
git clone --recursive https://github.com/kaitai-io/kaitai_struct.git
237+
cd kaitai_struct
238+
#
239+
# Select subproject you want to modify
240+
cd ${sub-project}
241+
# See current status
242+
git remote -v
243+
# Add your repository as remote with name my-repo
244+
git remote add ${my-repo} https://github.com/${my-repo}/${sub-project}.git
245+
# Check youself
246+
git remote -v
247+
# Get you work
248+
git fetch ${my-repo}
249+
# or, if you want to fetch only one branch `my-feature`. Use local branch name,
250+
# without repository name prefix, ie. just `some-feature` but not `my-repo/some-feature`
251+
# git fetch ${my-repo} ${my-feature}
252+
#
253+
# Switch to you feature branch
254+
git checkout ${my-feature}
255+
224256
== Tests
225257

226-
TODO
258+
To test changes in compiler and runtimes, run following commands (for example, for
259+
Java runtime):
260+
[source,shell]
261+
# Assumed, that this will be done
262+
# git clone --recursive https://github.com/kaitai-io/kaitai_struct.git
263+
# cd kaitai_struct
264+
cd tests
265+
./build-compiler
266+
# Convert all test `.ksy` files into all target languages (including Java),
267+
# which will give you tests/compiled/java
268+
./build-formats
269+
# will run all tests for Java; results will be in `test_out/java`
270+
./run-java
271+
272+
Also, see readme of https://github.com/kaitai-io/kaitai_struct_tests project.
227273

228274
== Publishing runtime libraries
229275

0 commit comments

Comments
 (0)