[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beardbolt 10b70ca151 181/323: Add custom logic for find
From: |
ELPA Syncer |
Subject: |
[elpa] externals/beardbolt 10b70ca151 181/323: Add custom logic for finding swiftc |
Date: |
Thu, 9 Mar 2023 10:58:29 -0500 (EST) |
branch: externals/beardbolt
commit 10b70ca15126545cd3c8887cdd7f9a09a80d410e
Author: Daniel Martín <mardani29@yahoo.es>
Commit: Daniel Martín <mardani29@yahoo.es>
Add custom logic for finding swiftc
swiftc, similarly to swift-demangle, can be configured in the PATH
variable or depend on the active Swift toolchain. Use the same logic
to find both tools.
---
rmsbolt.el | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/rmsbolt.el b/rmsbolt.el
index 80f70b5169..aa574cf4dd 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -723,19 +723,30 @@ https://github.com/derickr/vld"
(defun rmsbolt--path-to-swift-demangler ()
"Return the path to the configured Swift demangler, depending
on the active toolchain."
- (let* ((swift-demangle-binary "swift-demangle")
- (swift-demangle-toolchain-path (shell-command-to-string (format "echo
-n `xcrun --find %s`" swift-demangle-binary))))
- ;; If we have swift-demangle in PATH, just return it (this is the
+ (rmsbolt--path-to-swift-tool "swift-demangle"))
+
+;;;;; Language Integrations
+
+(defun rmsbolt--path-to-swift-compiler ()
+ "Return the path to the configured Swift compiler, depending on
+ the active toolchain."
+ (rmsbolt--path-to-swift-tool "swiftc"))
+
+(defun rmsbolt--path-to-swift-tool (swift-tool)
+ "Return the path to SWIFT-TOOL, depending on the active
+toolchain."
+ (let* ((swift-tool-binary swift-tool)
+ (swift-tool-toolchain-path (shell-command-to-string (format "echo -n
`xcrun --find %s`" swift-tool-binary))))
+ ;; If we have the Swift tool in PATH, just return it (this is the
;; typical case in Linux systems). If it's not in PATH, look for a
;; toolchain-specific path.
(cond
- ((executable-find swift-demangle-binary)
- swift-demangle-binary)
- ((executable-find swift-demangle-toolchain-path)
- swift-demangle-toolchain-path)
+ ((executable-find swift-tool-binary)
+ swift-tool-binary)
+ ((executable-find swift-tool-toolchain-path)
+ swift-tool-toolchain-path)
(t nil))))
-;;;;; Language Integrations
(defun rmsbolt--parse-compile-commands (comp-cmds file)
"Parse COMP-CMDS and extract a compilation dir and command for FILE."
(when-let ((json-object-type 'alist)
@@ -874,7 +885,7 @@ return t if successful."
:compile-cmd-function #'rmsbolt--go-compile-cmd
:process-asm-custom-fn
#'rmsbolt--process-go-asm-lines))
(swift-mode
- . ,(make-rmsbolt-lang :compile-cmd "swiftc"
+ . ,(make-rmsbolt-lang :compile-cmd (rmsbolt--path-to-swift-compiler)
:supports-asm t
:supports-disass nil
:objdumper 'objdump
- [elpa] externals/beardbolt d564f9def8 131/323: Update README.org, (continued)
- [elpa] externals/beardbolt d564f9def8 131/323: Update README.org, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt ebc56d81b0 127/323: Disable automatic recompile for buffers larger than 500 lines, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 5f998f34d7 137/323: Update README, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 4679974da1 141/323: Add documentation and starter file for PHP support, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 345dd21d24 145/323: Fix typo in docstring, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 33c687fae5 151/323: Implement helpers for compile_commands parsing, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 708260ac56 163/323: Add sharplab to README, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 79de946e68 161/323: Add IRC channel to README, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt cc4347908c 179/323: Inline demo screencast, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt b6e105190c 168/323: Actually use hidden-func-zig, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 10b70ca151 181/323: Add custom logic for finding swiftc,
ELPA Syncer <=
- [elpa] externals/beardbolt 565d4a44ee 180/323: Convert if chain into cond, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 2bb741e6f1 183/323: Merge branch 'add-swift-support' into 'master', ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 73a547856c 182/323: Remove rmsbolt-command from local variables in starter file, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 7045b8116a 185/323: Fixed spelling mistake, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 8ad27e8490 176/323: Added basic documentation for Go support, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 25cd95a3b3 174/323: Fix a typo, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt af0a8a6ec9 189/323: Merge branch 'master' of gitlab.com:jgkamat/rmsbolt, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt fcefc0509d 184/323: Add basic documentation for Swift, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 1b015e8d9b 212/323: Update ci to use alpine directly, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 62e68ea2d4 194/323: Fix overlays not working on first compile with popup, ELPA Syncer, 2023/03/09