-
-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
D Dscanner Support #426
D Dscanner Support #426
Conversation
|
Stylecheck is nice to have though since Dscanner currently doesn't accept both arguments at the same time, which I find strange. Therefore I have defined two new checkers
What do you say? |
|
Problem: I can't get flycheck to use both the
eventhough I thought defining |
|
How is dscanner syntax check different from d-dmd? Do we really need both? |
|
If you want a different syntax checker, you need to select it first, via |
|
@nordlow |
|
The three checkers are currently mostly mutally exclusive. I would like to have all of them available at once when possible :) |
|
@nordlow And how exactly is If you add proper It's just |
|
Ok. I rebased. You're improvement works fine. But I would still prefer multiple checkers by default when |
|
I don't understand why only the |
|
@nordlow Sorry, but I can't follow you. What wasn't clear about my previous comment? Again, Specifically, |
|
I'm not talking about a |
|
@nordlow Oh sorry, I misunderstood you then. I'm sorry. I am not sure what's wrong. The setup looks correct to me, but I did not try, for I do not use D and don't have it installed on my system. I'd need a bit more information:
|
|
The answer is yes on all your questions :) |
|
I did some more testing and found that only the first This causes only causes only I believe both should run. I also tried but that errors as |
|
@nordlow Ah, now I see the misunderstanding. You need a |
|
So what effect does multiple entries in Anyhow, should I change and instead then? |
|
Now I'm done :) Ready for merge? |
| ((error line-start (file-name) "(" line ":" column ")[error]: " (message) line-end) | ||
| (warning line-start (file-name) "(" line ":" column ")[warn]: " (message) line-end)) | ||
| :modes d-mode | ||
| :next-checkers (d-dscanner-style)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be ((warnings-only . d-dscanner-style))? Does it make sense to apply the style checker to a buffer with syntax errors?
|
@nordlow You didn't answer my question yet:
|
|
@nordlow And we need test cases for these new syntax checkers. I can write them myself, but I need code examples that trigger errors and warnings with these checkers. |
|
It's not easy describe the differences between DMD's and Dscanner's syntax check in a few words as I have just recently discovered the tool. Currently DScanners' syntax check gives false positives as it is not completely in sync with language standard (recent changes to DMD). Therefore I think style check should be activated eventhough syntax checking gives (false) warnings. |
|
@nordlow Try it, nonetheless. If I am to maintain these syntax checkers as part of Flycheck, you'll need to convince me that they are really necessary. And I'll want a good reason to merge a syntax checker that gives false positives because it isn't in sync with the language standard. |
|
In contrast to DMD,
It is a great complementary tool in most regards which I'm certain most D developers would love to have integrated into flycheck. |
|
In order to have a test suite for it you need to install it right? Do you want guidance on how to do this? |
|
@nordlow Well, that is a very convincing reason! I'll merge it.
Why, yes. Does that impose a problem? Flycheck has Ansible playbooks in |
|
Not, not a problem. I was just curious how you solve it :) I say this is ready for merge! :) |
…--syntaxCheck may give false positives
|
@nordlow How do you build this thing? The instructions mention a If we can't get Dscanner to build on Travis CI and in the local testing VM, I won't merge this PR, since I cannot reasonably maintain syntax checkers whose test cases I can't run. In this case, you'll need to maintain these syntax checkers yourself, outside of Flycheck. |
|
Are you using DMD 2.066? |
|
@nordlow Yes, of course. Don't you remember that we recently upgraded Flycheck to DMD 2.066? |
|
Could you show me the output? Update: Ahh, you didn't get any. I'll see what happens on my system. Hang on. I haven't rebuilt Dscanner in a while. |
|
@nordlow Yes, I didn't get any output. |
|
Killed by the kernel!? That sound like a useful feature instead of infinite swapping :) Is it a (kernel) add-on? |
|
Did you use Dscanner git master? |
|
@nordlow No, it's not. The stock Linux kernel automatically kills processes with excessive memory footprint in low memory situations. |
|
Hmm, building Dscanner Git-master with DMD Git-master and 2.066 both errors as: It is strange that I don't get the same error as you do. I guess we'll have to postpone it a while until things stabilize, I guess. |
|
@nordlow Yes. Just a straight clone from Github. I wanted to use releases, but there some to be none. |
|
I had forgotten to update the Git submodules of Dscanner. It builds ok now both with DMD Git master and 2.066. The compilation takes about 1 Gb of memory as DMD is currently a bit memory demanding for these kinds of projects. How much memory have you got? |
|
@nordlow Do you build on 32 bit or 64 bit? |
|
On 64-bit. I have 8 Gigs of RAM of mine. Do know of command to track and log min/max of the memory usage by a system call? ps is not convenient here. I want something that prints at the of the system call kind of like |
|
By the way, how long did the build take? |
gives As a said, about a GB of usage. using Dscanner commit |
|
@nordlow Well, my VM had only ~500 MB of RAM available. Still, the build claimed 1.3 GB at the time it was killed. That's half of what we have available on Travis CI, and more than I can reasonably provide for the local testing VM. Also, the entire test setup, i.e. all syntax checkers, plus tools, etc, takes about 11 minutes on Travis CI currently. Building Dscanner would almost double that. That's way too long. Are there no binary releases provided by Dscanner? |
|
No, not that I know of. It may become integrated into https://github.com/D-Programming-Language/tools in the future. |
|
@nordlow That's unfortunate. See, even the entire local VM setup (sans downloading the initial image) takes just about 15 minutes with a good network connection, so building Dscanner for the test suite is really not an option. I'm afraid I can't maintain Dscanner in Flycheck under these circumstances. You'll need to make a separate package for it. If you need any help, please don't hesitate to ask. Also, if you'd like to have a repo in the Flycheck org, just tell me. Take a look at the flycheck-d-unittest package for how such a package should look like. If Dscanner provides binary builds, or becomes available as part of the D compiler, we can still move the syntax checker into Flycheck itself, but currently it's impossible. Sorry. |
|
Ok. Fine for now. Thanks anyway. I'll get back to you if binaries gets released. |
|
@nordlow Sorry, just wanted to ask if you have created a package which integrates DScanner with FlyCheck. I think ideally it would first run it through |
|
No I haven't. I'd recommend cherry picking from https://github.com/nordlow/flycheck Just do a diff against against upstream repo. It contains |
First try at support for https://github.com/Hackerpilot/Dscanner in d-mode.
I have verified them indvidually using
flycheck-select-checker.