|
| 1 | +# Tests to check if "released" crates work |
| 2 | + |
| 3 | +This folder in special in a couple of ways. |
| 4 | + |
| 5 | +It's meant to check that released crates work well together. Especially it's meant to "simulate" a release |
| 6 | +by using a private registry (i.e. a local registry). |
| 7 | + |
| 8 | +For that reason the projects under this folder don't use path-dependencies. |
| 9 | + |
| 10 | +This folder (and it's sub-folders) are also not known to the general `xtask` commands. (except the `rel-check` command) |
| 11 | + |
| 12 | +The projects don't contain real code but just define dependencies to make sure they compile. |
| 13 | + |
| 14 | +## Walkthrough how to use it with the `rel-check` command |
| 15 | + |
| 16 | +`cargo xrel-check init` |
| 17 | + |
| 18 | +This will initialize the local registry with the dependencies used by the projects found in the `compile-tests` folder. |
| 19 | + |
| 20 | +`cargo xrel-check check` |
| 21 | + |
| 22 | +This just tries to build every project in the `compile-tests` folder. |
| 23 | +Please note that we remove `Cargo.lock` files before the build if they are present. |
| 24 | +If the local registry is initialized this will use it. |
| 25 | + |
| 26 | +To test how a version bump affects the test projects let's bump `esp-backtrace` to e.g. `0.999.0`. (manually) |
| 27 | + |
| 28 | +`cargo xrel-check update esp-backtrace` |
| 29 | + |
| 30 | +This will package and add the esp-backtrace crate. |
| 31 | + |
| 32 | +Let's see if it still compiles. (the test projects still use the current version - so this is expected to work) |
| 33 | + |
| 34 | +`cargo xrel-check check` |
| 35 | + |
| 36 | +Now get the test projects updated to use the bumped version of `esp-backtrace`: |
| 37 | + |
| 38 | +`cargo xrel-check yolo-bump` |
| 39 | + |
| 40 | +Notice the change in the `Cargo.toml`s - executing `cargo xrel-check check` should still work using the freshly "released" version of `esp-backtrace`. |
| 41 | + |
| 42 | +Now lets see how a bad release looks like! |
| 43 | + |
| 44 | +Bump the patch version of `esp-rom-sys` and change the name of the `init_syscall_table` function. |
| 45 | + |
| 46 | +`cargo xrel-check update esp-rom-sys` will "release" this breaking update. |
| 47 | + |
| 48 | +`cargo xrel-check check` should fail now because the test project will pickup the problematic patch release of `esp-rom-sys`. |
| 49 | +Even without changing anything anything in the test project. |
| 50 | + |
| 51 | +When done: `cargo xtask rel-check deinit` and revert local changes |
0 commit comments