Skip to content

Commit f03c118

Browse files
committed
Merge remote-tracking branch 'upstream/main' into remote_cluster_spec
2 parents 1d5d03a + 55d431a commit f03c118

File tree

19 files changed

+762
-489
lines changed

19 files changed

+762
-489
lines changed

.github/workflows/compiler-rs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Cargo Build & Test
2+
3+
on:
4+
pull_request:
5+
6+
env:
7+
CARGO_TERM_COLOR: always
8+
9+
jobs:
10+
build_and_test:
11+
name: compiler-rs
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Use Node.js 20
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
22+
- name: Install deps
23+
run: |
24+
make setup
25+
make generate
26+
make transform-to-openapi
27+
make transform-expand-generics
28+
29+
- name: Install Rust
30+
run: rustup update stable && rustup default stable
31+
32+
- run: cargo build --verbose
33+
working-directory: compiler-rs
34+
35+
- run: cargo test --verbose
36+
working-directory: compiler-rs

.github/workflows/update-rest-api-json.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
branch: ['main', '8.x', '8.15', '7.17']
16+
branch: ['main', '8.x', '8.16', '7.17']
1717

1818
steps:
1919
- uses: actions/checkout@v4

compiler-rs/clients_schema/src/transform/expand_generics.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,15 @@ pub fn expand(model: IndexedModel, config: ExpandConfig) -> anyhow::Result<Index
152152
itf.inherits = Some(expand_inherits(inherit, &mappings, model, ctx)?);
153153
}
154154

155+
if !itf.behaviors.is_empty() {
156+
itf.behaviors.iter().for_each(|b| {
157+
if b.generics.is_empty() {
158+
// If the behavior has no generics, we can just expand it
159+
let _ = expand_type(&b.typ, Vec::new(), model, ctx);
160+
}
161+
});
162+
}
163+
155164
// We keep the generic parameters of behaviors, but expand their value
156165
for behavior in &mut itf.behaviors {
157166
for arg in &mut behavior.generics {

0 commit comments

Comments
 (0)