SublimeLinter-contrib-rustc icon indicating copy to clipboard operation
SublimeLinter-contrib-rustc copied to clipboard

Rewrite for SL4

Open FichteFoll opened this issue 7 years ago • 9 comments

Conform to SL4 changes, using better integration and a couple bugfixes. Also uses rustc's JSON error format.

All old settings have been removed and replaced by new ones.

I mean, it is pretty much a complete rewrite.

If you're not looking forward to maintaining the package anymore, I can do so. I maintain two other linter plugins already and followed the SL4 rewrite, allowing me to know where to make changes. If you agree, I would move the fork over to my main account and replace the entry in Package Control's default channel. Or you can transfer the repo over, if you like.

Fixes #33, fixes #25, fixes #24 (by using SL4's working_dir setting), fixes #21 (through the custom command setting), fixes #5 Related: #26.

Probably needs some further testing as I'm sure I haven't run into all the corner cases with my very simple test setup.

FichteFoll avatar Dec 02 '18 18:12 FichteFoll

@FichteFoll will this plugin still work for those with SL3? I found that SL4 broke a lot of plugins, so I'm still on SL3 myself.

mandeep avatar Dec 02 '18 22:12 mandeep

No, it will not work with SL3 and I have no intention to make it work.

FichteFoll avatar Dec 03 '18 01:12 FichteFoll

Actually, I think I'll be using Rust Enhanced instead. It's better suited for the toolchain and the inline phantoms are quite helpful since they include all information from rustc rather than just the "message" summary line.

FichteFoll avatar Dec 03 '18 12:12 FichteFoll

Thanks! I'd be happy to merge and release this if I could get some help testing it. I no longer actively use Sublime.

oschwald avatar Dec 09 '18 18:12 oschwald

Well, the steps are pretty much as they were before.

Install SublimeLinter, clone my branch into the Packages dir and open a rust file or cargo project in ST (that means the folder). It should Just Work, assuming cargo and/or rustc are on your PATH.

FichteFoll avatar Dec 10 '18 00:12 FichteFoll

I'm not really sure I agree with merging this. A lot of SL3 plugins haven't seen updates so upgrading this plugin to SL4 will break everyone on SL3.

mandeep avatar Dec 19 '18 17:12 mandeep

Can you name a couple old plugins that don't work with sl4? We should rather update those to be compatible rather than hold back updates from other plugins because of this.

Also, does this plugin work for you at all in its current state?

FichteFoll avatar Dec 20 '18 09:12 FichteFoll

I remember sublimelinter-gcc being a problem, but I haven't tried it in awhile so the problems may be fixed.

This plugin currently works fine for me. Are you seeing issues?

mandeep avatar Dec 20 '18 20:12 mandeep

It didn't work for individual files using rustc anymore because of a change in the error format over a year ago. That's when I added json parsing for myself via https://github.com/oschwald/SublimeLinter-contrib-rustc/issues/26#issuecomment-259843971.

However, that also didn't work anymore when I tried it earlier this month, so I went ahead and rewrote the entire thing to support the new SL4 features such as highlighting the entire region reported by rustc (even over multiple lines) and generally being more stable due to using the JSON output format.

Anyway, due to how well RustEnhanced integrates the output messages of rustc (considering they usually consist of multiple lines and notes), I'm not using this package anymore.

Edit: Just as an update from the future (2023), I use LSP and LSP-rust-analyzer for Rust nowadays, along with the built-in Rust syntax.

FichteFoll avatar Dec 22 '18 01:12 FichteFoll