Commit bdc9bdb
authored
Use hie-bios to generalize build command (#37)
* Use hie-bios to generalize build command
Currently, HDA determines how to run ghci for any given project by
getting runCmd from the client.
Even though the VSCode extension and others set a default scaffolding
for either stack or cabal projects, this approach has a few
shortcomings:
1. Newish Haskell users are not well versed in the build systems so they
can't work around failures to invoke the commands as specified
2. Other build systems or even simple Haskell programs that are not a
package at all cannot benefit from HDA.
- For example, GHC uses the hadrian build system.
- Users new to Haskell don't use cabal nor stack straight away, but
could benefit from step by step execution of their program
Luckily, the hie-bios project aims to solve exactly this problem of
determining how to invoke GHC for any given Haskell project and supports
a wide range of different tools. It also allows users to be very precise
about their own build set up by reading a hie.yaml configuration.
haskell-language-server already uses this approach: call functions from
hie-bios to determine how to invoke ghc.
This commit does the same for HDA, to make it more robust across
different Haskell projects.
Manually tested on:
- GHC (custom hie.yaml)
- fast-tags (Cabal package)
- Simple Main.hs file with 1 dependency
* Only enable hie-bios when cmd=ghci-dap
Re-introduce stack and cabal based debugging sessions.
Now, hie-bios will only be used if the ghciCmd in launch.json is exactly
"ghci-dap"
This allows hie-bios workflows to co-exist with the remaining ones,
serving as a safety net if something goes wrong.1 parent 7b346ca commit bdc9bdb
File tree
4 files changed
+78
-29
lines changed- src/Haskell/Debug/Adapter/State/Init
4 files changed
+78
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
| |||
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
58 | | - | |
| 56 | + | |
59 | 57 | | |
60 | 58 | | |
61 | 59 | | |
| |||
111 | 109 | | |
112 | 110 | | |
113 | 111 | | |
114 | | - | |
| 112 | + | |
115 | 113 | | |
116 | 114 | | |
| 115 | + | |
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
| |||
185 | 184 | | |
186 | 185 | | |
187 | 186 | | |
188 | | - | |
| 187 | + | |
189 | 188 | | |
190 | 189 | | |
191 | 190 | | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
270 | 271 | | |
271 | 272 | | |
272 | 273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
26 | 33 | | |
27 | 34 | | |
28 | 35 | | |
| |||
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
51 | | - | |
| 58 | + | |
52 | 59 | | |
53 | 60 | | |
54 | 61 | | |
55 | | - | |
| 62 | + | |
56 | 63 | | |
57 | 64 | | |
58 | 65 | | |
| |||
127 | 134 | | |
128 | 135 | | |
129 | 136 | | |
130 | | - | |
131 | | - | |
132 | | - | |
| 137 | + | |
| 138 | + | |
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
136 | 142 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | 143 | | |
141 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
142 | 149 | | |
143 | | - | |
| 150 | + | |
144 | 151 | | |
145 | 152 | | |
146 | 153 | | |
147 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
148 | 181 | | |
149 | 182 | | |
150 | 183 | | |
151 | | - | |
| 184 | + | |
152 | 185 | | |
153 | 186 | | |
154 | | - | |
| 187 | + | |
| 188 | + | |
155 | 189 | | |
156 | 190 | | |
157 | 191 | | |
158 | 192 | | |
159 | 193 | | |
160 | 194 | | |
| 195 | + | |
| 196 | + | |
161 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
162 | 206 | | |
163 | 207 | | |
164 | 208 | | |
| |||
226 | 270 | | |
227 | 271 | | |
228 | 272 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
233 | 277 | | |
234 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
235 | 283 | | |
236 | 284 | | |
237 | 285 | | |
| |||
240 | 288 | | |
241 | 289 | | |
242 | 290 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | 291 | | |
247 | 292 | | |
248 | 293 | | |
| |||
260 | 305 | | |
261 | 306 | | |
262 | 307 | | |
263 | | - | |
264 | 308 | | |
265 | 309 | | |
266 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | | - | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
0 commit comments