This repository was archived by the owner on Jan 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Continuous Integration Cycles
Edd Barrett edited this page Oct 4, 2019
·
6 revisions
When working on Yorick, it's possible to create "CI cycles".
There are two main repos for Yorick:
-
ykrustc: the compiler. -
yk: the other stuff, includingykpack.
ykpack is the library that deals with SIR serialisation and de-serialisation. The compiler uses it to encode SIR into an ELF section, and the JIT runtime uses it to decode the section.
This leads to a problem: if you change the format of the SIR (change the serialised types in any way that would change the binary representation once serialised), then CI cannot succeed. This is because the yk repo needs to be built with a ykrustc which uses the new ykpack, but yk itself contains the new ykpack.
We break the cycle using a 3-PR model as follows:
- The reviewer conducts a review of the changes to the
ykrepo first. Get it ready for merge, but don't merge it yet. - The PR author then adds a separate commit to
ykrustcwhich overrides the dependency onykpack, pointing instead to the git revision containing the breaking changes. E.g.:
[dependencies]
...
#ykpack = { git = "https://github.com/softdevteam/yk" }
ykpack = { git = "https://github.com/vext01/yk", rev = "<git hash>" }
- The reviewer then reviews the
ykrustcchange and invokes bors to do the merge. - Once this is merged, the
ykchange can be merged. - Once that is merged, a new PR can be raised which simply backs out the dependency override in
ykrustc.