swift-emacs / swift-mode

Emacs support for Apple's Swift programming language.
GNU General Public License v3.0
372 stars 47 forks source link

Flycheck error: `wrong-type-argument stringp` #54

Closed ckruse closed 10 years ago

ckruse commented 10 years ago

With the latest changes I get the following error whenever I open a Swift file:

Error: (wrong-type-argument stringp ("/var/folders/x2/rr8_tk0169n9w8_lmjv6rg300000gn/T/flycheck63731PnK/AppDelegate.swift"))

The exact folder differs, but the message is always the same.

ap4y commented 10 years ago

I will check it. But I think we should just disable flycheck for time being, it fails a lot of checks for Xcode based projects, due to missing compilation settings. I have some ideas about how to improve it, but it needs some concepts of compilation database, like clang tooling does for example.

ckruse commented 10 years ago

How can I disable it? It is highly annoying, every time I save a file or open one or entering a line break I get this error…

ap4y commented 10 years ago

You can disable flycheck-mode, remove swift from flycheck-checkers (related source)

ckruse commented 10 years ago

Thanks. For the record: add this code to your swift-mode hook to disable flycheck for Swift:

(setq flycheck-checkers (remove 'swift flycheck-checkers))
ap4y commented 10 years ago

I will check it tomorrow and fix or disable it, going to sleep early today :)

ckruse commented 10 years ago

Just for your interest: with Emacs 24.4 I get this error:

eval-after-load: Symbol's value as variable is void: flycheck-swift-sdk-path

This makes swift-mode completely unusable currently

ap4y commented 10 years ago

Yeah, I noticed that too. Fixed in #56

ckruse commented 10 years ago

No, it's not yet fixed. I had to comment out the complete eval-after-load block to be able to use swift-mode again.