Commit 2aba5f1
unified: Make Bazel the only supported build
Nothing builds this extractor with `cargo` any more: the tests, the extractor
pack and the corpus regeneration all go through Bazel. The `cargo` half of the
build is now dead weight, and it is not free -- it is a second, independent way
of compiling the same Swift code, kept in step by hand.
`build.rs` shelled out to `swift build` on the SwiftPM package in `swift/`,
scraped `swiftc -print-target-info` for the runtime directory, and emitted the
resulting link and rpath flags. Bazel does none of that: it compiles
`SwiftSyntaxFFI.swift` directly against `@swift-syntax`, resolved from the Bazel
Central Registry. `Package.swift` and `Package.resolved` existed only for that
`swift build`.
Deleting them collapses three version pins into one. `MODULE.bazel` pinned the
toolchain, `.swift-version` pinned it again for `swiftly` and `build.rs`, and
`Package.swift` pinned the `swift-syntax` release a second time -- with a
comment asking that they be kept in sync and nothing enforcing it. Two Swift
builds that could silently diverge become one that cannot.
`cargo check` still works, since checking does not link, so rust-analyzer keeps
working across the crate -- completion, go-to-definition and inline diagnostics
included. What no longer works is `cargo build`/`cargo test`, and hence the
editor's "run test" lens; use `bazel test //unified/extractor:all_tests`. The
Cargo manifests stay because `misc/bazel/3rdparty` resolves third-party crate
versions from them.
`scripts/create-extractor-pack.sh` becomes a wrapper around the `codeql_pack`
installer that already existed, rather than a parallel cargo-based assembly of
the same pack.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 297ff885-7c13-4202-a9d0-bc0b17f68d8e1 parent 6dc61eb commit 2aba5f1
9 files changed
Lines changed: 36 additions & 245 deletions
File tree
- unified
- swift-syntax-rs
- swift
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
| 231 | + | |
| 232 | + | |
238 | 233 | | |
239 | 234 | | |
240 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | 128 | | |
142 | 129 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
166 | 134 | | |
167 | 135 | | |
168 | 136 | | |
169 | 137 | | |
170 | 138 | | |
171 | 139 | | |
172 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
173 | 148 | | |
174 | 149 | | |
175 | 150 | | |
| |||
186 | 161 | | |
187 | 162 | | |
188 | 163 | | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
203 | 170 | | |
204 | 171 | | |
205 | 172 | | |
| |||
213 | 180 | | |
214 | 181 | | |
215 | 182 | | |
216 | | - | |
| 183 | + | |
217 | 184 | | |
218 | 185 | | |
219 | 186 | | |
220 | 187 | | |
221 | 188 | | |
222 | 189 | | |
223 | 190 | | |
224 | | - | |
225 | | - | |
226 | | - | |
| 191 | + | |
| 192 | + | |
227 | 193 | | |
228 | 194 | | |
229 | 195 | | |
230 | | - | |
231 | | - | |
232 | | - | |
| 196 | + | |
| 197 | + | |
233 | 198 | | |
234 | 199 | | |
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments