Skip to content

Commit fd50fc9

Browse files
committed
build: declare sibling crates by registry version
Sibling crates were declared with out-of-tree `path` dependencies, so this manifest resolved only when several repositories happened to be checked out side by side. A standalone clone failed at dependency resolution -- which is why every workflow had to clone the siblings first, and why automated dependency updates could not run against Cargo manifests here at all. Each sibling is now declared by its published version. A development workspace still builds them from source, through a `[patch.crates-io]` entry in a Cargo config that lives outside this repository, so nothing here carries a path that only exists in one working copy. - drop the sibling checkout steps from the workflows - enable the cargo ecosystem for automated dependency updates
1 parent 271c457 commit fd50fc9

4 files changed

Lines changed: 16 additions & 66 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,17 @@ updates:
3232
- minor
3333
- patch
3434

35-
# NOTE — there is deliberately no `cargo` entry here.
36-
#
37-
# This crate declares sibling crates with a `path = "../../..."` dependency that
38-
# resolves only when the whole family is checked out together. Dependabot clones
39-
# this repository alone, so `cargo update` fails there:
40-
#
41-
# error: failed to load source for dependency `<sibling>`
42-
#
43-
# (Reproduced with `cargo metadata` in a standalone clone: exit 101.) A cargo
44-
# entry would therefore be a job that fails every month while looking like
45-
# coverage. CI works because it clones the siblings explicitly first.
46-
#
47-
# Removing this limitation means replacing the path dependencies with registry
48-
# versions plus a `[patch.crates-io]` section in the development workspace —
49-
# a cross-repository change, tracked separately.
35+
- package-ecosystem: cargo
36+
directory: /engine
37+
schedule:
38+
interval: monthly
39+
open-pull-requests-limit: 5
40+
groups:
41+
# Minor and patch land together. Majors stay separate: a breaking
42+
# migration is a dedicated piece of work, not a routine bump.
43+
cargo-minor-patch:
44+
patterns:
45+
- "*"
46+
update-types:
47+
- minor
48+
- patch

‎.github/workflows/ci.yml‎

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ jobs:
4141
runs-on: ubuntu-latest
4242
steps:
4343
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
44-
- name: Checkout path dependencies
45-
shell: bash
46-
run: |
47-
mkdir -p ../../foundation ../../algorithms ../../frameworks
48-
git clone --depth 1 https://github.com/iyulab/u-numflow.git ../../foundation/u-numflow
49-
git clone --depth 1 https://github.com/iyulab/u-metaheur.git ../../algorithms/u-metaheur
50-
git clone --depth 1 https://github.com/iyulab/u-schedule.git ../../frameworks/u-schedule
5144
- uses: dtolnay/rust-toolchain@d1031067263f94b142dd6c0ce24c5eb9d02d52a0 # master
5245
with:
5346
toolchain: stable
@@ -70,13 +63,6 @@ jobs:
7063
os: ${{ github.ref == 'refs/heads/main' && fromJSON('["ubuntu-latest", "windows-latest"]') || fromJSON('["ubuntu-latest"]') }}
7164
steps:
7265
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
73-
- name: Checkout path dependencies
74-
shell: bash
75-
run: |
76-
mkdir -p ../../foundation ../../algorithms ../../frameworks
77-
git clone --depth 1 https://github.com/iyulab/u-numflow.git ../../foundation/u-numflow
78-
git clone --depth 1 https://github.com/iyulab/u-metaheur.git ../../algorithms/u-metaheur
79-
git clone --depth 1 https://github.com/iyulab/u-schedule.git ../../frameworks/u-schedule
8066
- uses: dtolnay/rust-toolchain@d1031067263f94b142dd6c0ce24c5eb9d02d52a0 # master
8167
with:
8268
toolchain: stable
@@ -95,13 +81,6 @@ jobs:
9581
if: github.ref == 'refs/heads/main'
9682
steps:
9783
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
98-
- name: Checkout path dependencies
99-
shell: bash
100-
run: |
101-
mkdir -p ../../foundation ../../algorithms ../../frameworks
102-
git clone --depth 1 https://github.com/iyulab/u-numflow.git ../../foundation/u-numflow
103-
git clone --depth 1 https://github.com/iyulab/u-metaheur.git ../../algorithms/u-metaheur
104-
git clone --depth 1 https://github.com/iyulab/u-schedule.git ../../frameworks/u-schedule
10584
- uses: dtolnay/rust-toolchain@d1031067263f94b142dd6c0ce24c5eb9d02d52a0 # master
10685
with:
10786
toolchain: stable
@@ -117,13 +96,6 @@ jobs:
11796
runs-on: ubuntu-latest
11897
steps:
11998
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
120-
- name: Checkout path dependencies
121-
shell: bash
122-
run: |
123-
mkdir -p ../../foundation ../../algorithms ../../frameworks
124-
git clone --depth 1 https://github.com/iyulab/u-numflow.git ../../foundation/u-numflow
125-
git clone --depth 1 https://github.com/iyulab/u-metaheur.git ../../algorithms/u-metaheur
126-
git clone --depth 1 https://github.com/iyulab/u-schedule.git ../../frameworks/u-schedule
12799
- uses: dtolnay/rust-toolchain@d1031067263f94b142dd6c0ce24c5eb9d02d52a0 # master
128100
with:
129101
toolchain: stable
@@ -141,13 +113,6 @@ jobs:
141113
runs-on: ubuntu-latest
142114
steps:
143115
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
144-
- name: Checkout path dependencies
145-
shell: bash
146-
run: |
147-
mkdir -p ../../foundation ../../algorithms ../../frameworks
148-
git clone --depth 1 https://github.com/iyulab/u-numflow.git ../../foundation/u-numflow
149-
git clone --depth 1 https://github.com/iyulab/u-metaheur.git ../../algorithms/u-metaheur
150-
git clone --depth 1 https://github.com/iyulab/u-schedule.git ../../frameworks/u-schedule
151116
# Prebuilt binary (~seconds) instead of `cargo install cargo-audit`
152117
# which recompiles from source (~3-4 min) on every run.
153118
- uses: taiki-e/install-action@84f5ac3124727fb3d284d4d22ee9ab3654fd09a6 # v2
@@ -187,13 +152,6 @@ jobs:
187152
if: github.ref == 'refs/heads/main'
188153
steps:
189154
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
190-
- name: Checkout path dependencies
191-
shell: bash
192-
run: |
193-
mkdir -p ../../foundation ../../algorithms ../../frameworks
194-
git clone --depth 1 https://github.com/iyulab/u-numflow.git ../../foundation/u-numflow
195-
git clone --depth 1 https://github.com/iyulab/u-metaheur.git ../../algorithms/u-metaheur
196-
git clone --depth 1 https://github.com/iyulab/u-schedule.git ../../frameworks/u-schedule
197155
- uses: dtolnay/rust-toolchain@d1031067263f94b142dd6c0ce24c5eb9d02d52a0 # master
198156
with:
199157
toolchain: stable

‎.github/workflows/release.yml‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,6 @@ jobs:
9898
submodules: recursive
9999
token: ${{ secrets.GH_PAT }}
100100

101-
- name: Checkout path dependencies
102-
shell: bash
103-
run: |
104-
mkdir -p ../../foundation ../../algorithms ../../frameworks
105-
git clone --depth 1 https://github.com/iyulab/u-numflow.git ../../foundation/u-numflow
106-
git clone --depth 1 https://github.com/iyulab/u-metaheur.git ../../algorithms/u-metaheur
107-
git clone --depth 1 https://github.com/iyulab/u-schedule.git ../../frameworks/u-schedule
108101

109102
- name: Setup Rust
110103
uses: dtolnay/rust-toolchain@d1031067263f94b142dd6c0ce24c5eb9d02d52a0 # master

‎engine/Cargo.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ description = "U-APS Scheduling Engine"
99
crate-type = ["cdylib", "rlib"]
1010

1111
[dependencies]
12-
u-metaheur = { version = "0.4", path = "../../../algorithms/u-metaheur", features = ["serde"] }
13-
u-schedule = { version = "0.6", path = "../../../frameworks/u-schedule" }
12+
u-metaheur = { version = "0.4", features = ["serde"] }
13+
u-schedule = "0.6"
1414
serde = { version = "1.0", features = ["derive"] }
1515
serde_json = "1.0"
1616
chrono = { version = "0.4", features = ["serde"] }

0 commit comments

Comments
 (0)