Problem
Today a minor build failure occurred in the upstream dev branch of Makepad, which caused cargo-makepad to not build correctly. This itself caused our CI actions to fail because the step where we install cargo makepad (for cross-compiling mobile builds of Robrix) failed to build and install.
Temporary Solution
In #652, I changed the invocations of cargo install ... cargo makepad to use the same git repo and branch as the makepad-widgets dependency defined in the top-level Cargo.toml.
Here is one of those CI steps:
|
# The git repo and branch MUST MATCH the `makepad-widgets` dependency defined in `Cargo.toml`. |
|
run: | |
|
cargo install --force --git https://github.com/kevinaboos/makepad.git --branch serde_optional cargo-makepad |
and here is the note in Cargo.toml:
|
## !NOTE! When updating the makepad dependency, be sure to also change the repo and branch |
|
## !!!!!! that are used in `builds.yml` for installing cargo makepad from git. |
|
## !!!!!! The version (git repo + branch) installed in CI actions should the one defined here. |
|
makepad-widgets = { git = "https://github.com/kevinaboos/makepad", branch = "serde_optional", features = ["serde"] } |
Proper Solution
The above solution works, but requires manual fixing up any time we update makepad. It is also not truly correct because it defines a github repo and branch, but not a specific commit/revision.
Instead, we should have a CI step that looks at the Cargo.lock file, not the Cargo.toml file, to see which specific revision of makepad was actually selected by cargo. It should then install the same specific revision of cargo makepad in all of the builds.yml steps, and wherever else we need to choose a particular version of makepad or cargo-makepad.
Problem
Today a minor build failure occurred in the upstream
devbranch of Makepad, which causedcargo-makepadto not build correctly. This itself caused our CI actions to fail because the step where we install cargo makepad (for cross-compiling mobile builds of Robrix) failed to build and install.Temporary Solution
In #652, I changed the invocations of
cargo install ... cargo makepadto use the same git repo and branch as themakepad-widgetsdependency defined in the top-levelCargo.toml.Here is one of those CI steps:
robrix/.github/workflows/builds.yml
Lines 175 to 177 in 5972032
and here is the note in Cargo.toml:
robrix/Cargo.toml
Lines 19 to 22 in 5972032
Proper Solution
The above solution works, but requires manual fixing up any time we update makepad. It is also not truly correct because it defines a github repo and branch, but not a specific commit/revision.
Instead, we should have a CI step that looks at the
Cargo.lockfile, not theCargo.tomlfile, to see which specific revision of makepad was actually selected by cargo. It should then install the same specific revision ofcargo makepadin all of thebuilds.ymlsteps, and wherever else we need to choose a particular version of makepad or cargo-makepad.