Commit 92b2a17
committed
Introduce :execute option and functionality
This patch adds more superpowers to launchpad: it can now launch the
first configured `:exec-fn` (and relative `:exec-args`).
This behavior is enabled by adding `--execute` to the command line.
It does it by introducing a brand new `execute-steps` var containing,
among the others, the `exec-fn-eval-forms` step - the logic for
appending the correct `:eval-forms`.
Note that this is a completely new code path and neither start nrepl nor
hooks up the hot reloading facilities.
An example, you can configure an mcp alias (from bhauman/clojure-mcp)
within `deps.local.edn` like this:
```clojure
:aliases {:mcp {:extra-deps {org.slf4j/slf4j-nop {:mvn/version "2.0.16"}
com.bhauman/clojure-mcp {:local/root "/path/to/clojure-mcp"}}
:exec-fn clojure-mcp.main/start-mcp-server
:exec-args {:port 7888}}}
...
```
Launchpad will be able to call `clojure-mcp.main/start-mcp-server` this
way:
```
$ launchpad --execute mcp
```
Note that this is a completely new code path and neither start nrepl nor
hooks up the hot reloading facilities.1 parent 3d0cabf commit 92b2a17
3 files changed
+71
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
258 | 286 | | |
259 | 287 | | |
260 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
349 | 350 | | |
350 | 351 | | |
351 | 352 | | |
352 | | - | |
| 353 | + | |
353 | 354 | | |
354 | 355 | | |
355 | 356 | | |
356 | 357 | | |
357 | 358 | | |
358 | 359 | | |
359 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
360 | 375 | | |
361 | 376 | | |
362 | 377 | | |
| |||
544 | 559 | | |
545 | 560 | | |
546 | 561 | | |
547 | | - | |
| 562 | + | |
548 | 563 | | |
549 | 564 | | |
550 | 565 | | |
| |||
566 | 581 | | |
567 | 582 | | |
568 | 583 | | |
569 | | - | |
| 584 | + | |
570 | 585 | | |
571 | 586 | | |
572 | 587 | | |
| |||
576 | 591 | | |
577 | 592 | | |
578 | 593 | | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
579 | 602 | | |
580 | 603 | | |
581 | 604 | | |
| |||
609 | 632 | | |
610 | 633 | | |
611 | 634 | | |
612 | | - | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
613 | 647 | | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
| 648 | + | |
623 | 649 | | |
624 | 650 | | |
625 | 651 | | |
| |||
0 commit comments