Conversation
| try | ||
| let root = tempname() | ||
| let root = tempname() . '/' | ||
| call mkdir(root, 'p') |
There was a problem hiding this comment.
Seems like vim73 does not like the extra slash here with the mkdir.
There was a problem hiding this comment.
Please also use neomake#utils#Slash() for Windows compatibility in the future.. (related: see neomake#utils#fname in 119dc9b - not in master though yet)
|
I hope the last commit fixes current issues. If I'll also like to add the mentioned |
|
@blueyed Any remarks / necessary changes? |
blueyed
left a comment
There was a problem hiding this comment.
I think it looks really decent already, but there is no rush to merge it - as you can see from your last commit there is usually stuff that pops up while using it.
As for gradualizer.sh and only skimming this quickly I think it might not really be necessary after all, since errorfornat and or post-processing could also handle this?!
| #set -x | ||
|
|
||
| # Set to your gradualizer location or make sure the command is in PATH | ||
| GRADUALIZER=gradualizer |
There was a problem hiding this comment.
Maybe this could be gradualizer=${GRADUALIZER:-gradulizer} (and then use $gradulizer below), if this should be more easily configurable.
Also consider using NEOMAKE_GRADUALIZER first then, if it makes sense.
| SED=gsed | ||
| else | ||
| SED=sed | ||
| fi |
There was a problem hiding this comment.
This doesn't look that good: it shells out to uname for once.
Is GNU sed really required?
And shouldn't the errorformat just handle this (the replacement) maybe even?
There was a problem hiding this comment.
GNU and BSD sed do behave differently with the present command and I was not able to come up with a sed script/command which would achieve the same but work for both of them.
Then, it's arguable, but I think more probable that a developer using a Mac will have gsed installed, than a Linux person a BSD sed installed.
I'll look into errorformat, maybe you're right that it's possible to ditch the shell script altogether.
| SED=sed | ||
| fi | ||
|
|
||
| $GRADUALIZER $@ | $SED '/\(.*on line \([0-9]*\)\)/ {s//\2:\1/}' | sort -n | uniq |
There was a problem hiding this comment.
Additionally: why the sort and uniq?
There was a problem hiding this comment.
Ahhh, my mistake. The surplus let args += [expand('%')] in neomake#makers#ft#erlang#GradualizerArgs was the reason, because the file was processed twice.
Definitely. I just had some spare time and figured it couldn't hurt to ask. Thanks for the pointers! |
a0368e1 to
9b894f2
Compare
9b894f2 to
458cba3
Compare
…default It's possible to enable the maker with the standard Neomake setting: let g:neomake_erlang_enabled_makers = ['erlc', 'gradualizer']
In the longer run gradualizer itself might print consumable output. Until then, though, a thin shell script sanitizes the messages for Vim.
Using Vim `errorformat` it's possible to consume Gradualizer output directly.
7985a52 to
4dbc28c
Compare
Gradualizer implements a gradual typing system for Erlang. Although still under development, it's already useful, while integration with Vim/NeoMake will hopefully foster early adoption a bit.
This PR refactors the existing Erlang
erlcsupport code for reuse with the newgradualizermaker. The maker is not enabled by default, since Gradualizer still rarely crashes on some code files - this doesn't affect Vim, though. One has to opt-in with:The maker by default calls.gradualizer.sh- a shim shell script which processes Gradualizer output so that it is consumable with a simple pattern - this script is not included in this PR, but will be PRed to Gradualizer