Skip to content

Commit 7d87492

Browse files
authored
Merge pull request #17609 from MinaProtocol/dkijania/bump_dhall_to_1_42
make dhalls compliant with 1.41.1
2 parents 6a57849 + 22565f2 commit 7d87492

File tree

7 files changed

+33
-26
lines changed

7 files changed

+33
-26
lines changed

buildkite/Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,26 @@ check_syntax:
44
# xargs will short-circuit if a command fails with code 255
55
find ./src/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'echo "{}" && dhall --file {} > /dev/null || exit 255'
66

7-
check_lint:
8-
@echo "Dhall version: $$(dhall --version)"
7+
convert_backticks_to_ifs:
8+
sed -i -E 's/`if` =/if =/g' src/Command/Base.dhall
9+
10+
convert_ifs_to_backticks:
11+
sed -i -E 's/if =/`if` =/g' src/Command/Base.dhall
12+
13+
check_lint: convert_backticks_to_ifs
914
find ./src/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'echo "{}" && dhall --ascii lint --check --inplace {} || exit 255'
1015

11-
check_format:
16+
check_format: convert_backticks_to_ifs
1217
@echo "Dhall version: $$(dhall --version)"
1318
find ./src/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'echo "{} format" && dhall --ascii format --check --inplace {} || exit 255'
1419

1520
lint:
1621
find ./src/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'echo "{}" && dhall --ascii lint --inplace {} || exit 255'
22+
$(MAKE) convert_ifs_to_backticks
1723

1824
format:
1925
find ./src/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'echo "{}" && dhall --ascii format --inplace {} || exit 255'
26+
$(MAKE) convert_ifs_to_backticks
2027

2128
check_filter:
2229
# Ensure Jobs.dhall is generated before proceeding

buildkite/src/Command/Base.dhall

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ let Config =
102102
, flake_retry_limit : Optional Natural
103103
, soft_fail : Optional B/SoftFail
104104
, skip : Optional B/Skip
105-
, if : Optional B/If
105+
, if_ : Optional B/If
106106
, timeout_in_minutes : Optional Integer
107107
}
108108
, default =
@@ -116,7 +116,7 @@ let Config =
116116
, flake_retry_limit = Some 0
117117
, soft_fail = None B/SoftFail
118118
, skip = None B/Skip
119-
, if = None B/If
119+
, if_ = None B/If
120120
, timeout_in_minutes = None Integer
121121
}
122122
}
@@ -244,7 +244,7 @@ let build
244244
}
245245
, soft_fail = c.soft_fail
246246
, skip = c.skip
247-
, if = c.if
247+
, `if` = c.if_
248248
, plugins =
249249
let dockerPart =
250250
Optional/toList

buildkite/src/Command/DockerImage.dhall

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ let ReleaseSpec =
5454
, step_key_suffix : Text
5555
, docker_publish : DockerPublish.Type
5656
, verify : Bool
57-
, if : Optional B/If
57+
, if_ : Optional B/If
5858
}
5959
, default =
6060
{ deps = [] : List Command.TaggedKey.Type
@@ -77,7 +77,7 @@ let ReleaseSpec =
7777
, step_key_suffix = "-docker-image"
7878
, verify = False
7979
, deb_suffix = None Text
80-
, if = None B/If
80+
, if_ = None B/If
8181
}
8282
}
8383

@@ -253,7 +253,7 @@ let generateStep =
253253
, target = Size.XLarge
254254
, docker_login = Some DockerLogin::{=}
255255
, depends_on = spec.deps
256-
, if = spec.if
256+
, if_ = spec.if_
257257
}
258258

259259
in { generateStep = generateStep

buildkite/src/Command/MinaArtifact.dhall

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ let MinaBuildSpec =
6464
, arch : Arch.Type
6565
, deb_legacy_version : Text
6666
, suffix : Optional Text
67-
, if : Optional B/If
67+
, if_ : Optional B/If
6868
}
6969
, default =
7070
{ prefix = "MinaArtifact"
@@ -83,7 +83,7 @@ let MinaBuildSpec =
8383
, suffix = None Text
8484
, deb_legacy_version = "3.1.1-alpha1-compatible-14a8b92"
8585
, arch = Arch.Type.Amd64
86-
, if = None B/If
86+
, if_ = None B/If
8787
}
8888
}
8989

@@ -140,7 +140,7 @@ let build_artifacts
140140
, label = "Debian: Build ${labelSuffix spec}"
141141
, key = "build-deb-pkg${Optional/default Text "" spec.suffix}"
142142
, target = Size.XLarge
143-
, if = spec.if
143+
, if_ = spec.if_
144144
, retries =
145145
[ Command.Retry::{
146146
, exit_status = Command.ExitStatus.Code +2
@@ -183,7 +183,7 @@ let docker_step
183183
, deb_legacy_version = spec.deb_legacy_version
184184
, verify = True
185185
, arch = spec.arch
186-
, if = spec.if
186+
, if_ = spec.if_
187187
}
188188
]
189189
, DaemonAutoHardfork =
@@ -244,7 +244,7 @@ let docker_step
244244
, deb_repo = DebianRepo.Type.Local
245245
, deb_legacy_version = spec.deb_legacy_version
246246
, arch = spec.arch
247-
, if = spec.if
247+
, if_ = spec.if_
248248
}
249249
]
250250
, Archive =
@@ -260,7 +260,7 @@ let docker_step
260260
, deb_legacy_version = spec.deb_legacy_version
261261
, verify = True
262262
, arch = spec.arch
263-
, if = spec.if
263+
, if_ = spec.if_
264264
}
265265
]
266266
, Rosetta =
@@ -275,7 +275,7 @@ let docker_step
275275
, deb_legacy_version = spec.deb_legacy_version
276276
, verify = True
277277
, arch = spec.arch
278-
, if = spec.if
278+
, if_ = spec.if_
279279
}
280280
]
281281
, ZkappTestTransaction =
@@ -289,7 +289,7 @@ let docker_step
289289
, deb_codename = spec.debVersion
290290
, deb_legacy_version = spec.deb_legacy_version
291291
, arch = spec.arch
292-
, if = spec.if
292+
, if_ = spec.if_
293293
}
294294
]
295295
, FunctionalTestSuite =
@@ -304,7 +304,7 @@ let docker_step
304304
, deb_profile = spec.profile
305305
, deb_legacy_version = spec.deb_legacy_version
306306
, arch = spec.arch
307-
, if = spec.if
307+
, if_ = spec.if_
308308
}
309309
]
310310
, Toolchain = [] : List DockerImage.ReleaseSpec.Type

buildkite/src/Command/Packages/Publish.dhall

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ let Spec =
7272
, depends_on : List Command.TaggedKey.Type
7373
, branch : Text
7474
, architectures : List Architecture.Type
75-
, if : Optional Text
75+
, if_ : Optional Text
7676
}
7777
, default =
7878
{ artifacts = [] : List Package.Type
@@ -89,7 +89,7 @@ let Spec =
8989
, verify = True
9090
, branch = ""
9191
, architectures = [ Architecture.Type.Amd64, Architecture.Type.Arm64 ]
92-
, if = None Text
92+
, if_ = None Text
9393
}
9494
}
9595

@@ -224,7 +224,7 @@ let publish
224224
spec.channel}"
225225
, target = Size.Small
226226
, depends_on = spec.depends_on
227-
, if = spec.if
227+
, if_ = spec.if_
228228
}
229229
]
230230
# Prelude.List.map
@@ -258,7 +258,7 @@ let publish
258258
r.index}"
259259
, target = Size.Small
260260
, depends_on = spec.depends_on
261-
, if = spec.if
261+
, if_ = spec.if_
262262
}
263263
)
264264
indexedAdditionalTags

buildkite/src/Command/Rosetta/Connectivity.dhall

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ let Spec =
3737
, timeout : Natural
3838
, profile : Profiles.Type
3939
, scope : List PipelineScope.Type
40-
, if : B/If
40+
, if_ : B/If
4141
}
4242
, default =
4343
{ dockerType = Dockers.Type.Bullseye
@@ -47,7 +47,7 @@ let Spec =
4747
, timeout = 1000
4848
, profile = Profiles.Type.Devnet
4949
, scope = PipelineScope.Full
50-
, if =
50+
, if_ =
5151
"build.pull_request.base_branch != \"develop\" || build.branch == \"develop\""
5252
}
5353
}
@@ -73,7 +73,7 @@ let command
7373
"rosetta-${Network.lowerName spec.network}-connectivity-test"
7474
, target = Size.XLarge
7575
, soft_fail = Some spec.softFail
76-
, if = Some spec.if
76+
, if_ = Some spec.if_
7777
, depends_on =
7878
Dockers.dependsOn
7979
Dockers.DepsSpec::{

buildkite/src/Jobs/Promote/AutoPromoteNightly.dhall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ let specs_for_branch =
7777
, branch = "\\\${BUILDKITE_BRANCH}"
7878
, source_version = "\\\${MINA_DEB_VERSION}"
7979
, build_id = "\\\${BUILDKITE_BUILD_ID}"
80-
, if = Some "build.branch == \"${branch}\""
80+
, if_ = Some "build.branch == \"${branch}\""
8181
}
8282

8383
in Pipeline.build

0 commit comments

Comments
 (0)