Giter VIP home page Giter VIP logo

sbt-quickfix's People

Contributors

adelbertc avatar derekwyatt avatar dscleaver avatar dylex avatar jazmit avatar leifwickland avatar mpollmeier avatar zane-xy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sbt-quickfix's Issues

DocBug: "plugins.sbt" versus "build.sbt"

Hello -- I followed the documentation in the README.md --

I put
addSbtPlugin("com.dscleaver.sbt" % "sbt-quickfix" % "0.4.1")

into ~/.sbt/0.13/plugins/plugins.sbt.

However, nothing was applied when I started sbt. I found the plugin documentation
for sbt [1] says "You can create ~/.sbt/0.13/plugins/build.sbt and put addSbtPlugin() expressions in there to add plugins to all your projects at once".

I renamed my ~/.sbt/0.13/plugins/plugins.sbt file to ~/.sbt/0.13/plugins/build.sbt and started sbt. sbt then correctly downloaded this awesome plugin.

I think that "/.sbt/0.13/plugins/plugins.sbt" in the README should be changed to "/.sbt/0.13/plugins/build.sbt"

[1] http://www.scala-sbt.org/0.13/tutorial/Using-Plugins.html

Reset quickfix list in vim when there are no errors

When an error occurs, the plugin calls vim to load the quickfix file and sets vim's quickfix list. When the error is removed, the quickfix list in vim isn't reset although the quickfix file target/quickfix/sbt.quickfix is empty.

Expected behaviour: Reset the quickfix list in vim to an empty list when there no longer are any errors.

Empty sbt.quickfix file generated despite error reported by sbt

Hi,

I like the idea of this plugin very much, but haven't managed to get it to work. I followed the instructions and introduced an error into a scala file. I could see that the $project/target/quickfix/sbt.quickfix file was generated, but it was empty despite sbt telling me very clearly that I have an error in the file.

Some system information (please tell me if you need to know anything else):

  • sbt 0.13.12
  • java 1.8.0_102 (oracle)
  • vim 8.0 with +clientserver
  • sbt-plugin added to global sbt plugin conf
  • sbt installVimPlugin executed successfully

NullPointerException

I get the following error when running a multi-build project's tests. Some more information that might be helpful: I'm running a scala.js + Play project.
My project structure is :

root/scalajsProject/
root/playProject/
root/build.sbt

Please let me know if I can give any more information.

java.lang.NullPointerException

at java.lang.String.endsWith(String.java:1449)
at com.dscleaver.sbt.quickfix.QuickFixTestListener$$anonfun$findSource$1.apply(QuickFixTestListener.scala:63)
at com.dscleaver.sbt.quickfix.QuickFixTestListener$$anonfun$findSource$1.apply(QuickFixTestListener.scala:63)
at scala.collection.IndexedSeqOptimized$$anonfun$1.apply(IndexedSeqOptimized.scala:44)
at scala.collection.IndexedSeqOptimized$$anonfun$1.apply(IndexedSeqOptimized.scala:44)
at scala.collection.IndexedSeqOptimized$class.segmentLength(IndexedSeqOptimized.scala:189)
at scala.collection.mutable.ArrayBuffer.segmentLength(ArrayBuffer.scala:47)
at scala.collection.GenSeqLike$class.prefixLength(GenSeqLike.scala:92)
at scala.collection.AbstractSeq.prefixLength(Seq.scala:40)
at scala.collection.IndexedSeqOptimized$class.find(IndexedSeqOptimized.scala:44)
at scala.collection.mutable.ArrayBuffer.find(ArrayBuffer.scala:47)
at com.dscleaver.sbt.quickfix.QuickFixTestListener.findSource(QuickFixTestListener.scala:63)
at com.dscleaver.sbt.quickfix.QuickFixTestListener$$anonfun$findInStackTrace$1.apply(QuickFixTestListener.scala:59)
at com.dscleaver.sbt.quickfix.QuickFixTestListener$$anonfun$findInStackTrace$1.apply(QuickFixTestListener.scala:58)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:108)
at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
at scala.collection.mutable.ArrayOps$ofRef.flatMap(ArrayOps.scala:108)
at com.dscleaver.sbt.quickfix.QuickFixTestListener.findInStackTrace(QuickFixTestListener.scala:58)
at com.dscleaver.sbt.quickfix.QuickFixTestListener.find(QuickFixTestListener.scala:52)
at com.dscleaver.sbt.quickfix.QuickFixTestListener$$anonfun$writeFailure$2.apply(QuickFixTestListener.scala:37)
at com.dscleaver.sbt.quickfix.QuickFixTestListener$$anonfun$writeFailure$2.apply(QuickFixTestListener.scala:35)
at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
at scala.collection.mutable.ListBuffer.foreach(ListBuffer.scala:45)
at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771)
at com.dscleaver.sbt.quickfix.QuickFixTestListener.writeFailure(QuickFixTestListener.scala:35)
at com.dscleaver.sbt.quickfix.QuickFixTestListener.testEvent(QuickFixTestListener.scala:23)

Improving Documentation

Hi,
this plug-in sounds very nice. None-Vim experts (e.g. me) are unable to get the Vim quickfix running by the Readme.

I think this could be also a problem for others. Could you elaborate this a little bit more inside the Readme.md?

Vim answers :cc1 with "No Error", but a target/quickfix/sbt.quickfix with a reported error exists.

Thanks, Jentsch

Issues with runtimepath on Vundle

Currently using the Vundle manager for my Vim setup, and everything I install through Vundle works fine. I added the necessary things to ~/.sbt/0.13/plugins/plugins.sbt, launched SBT in a project somewhere, and ran the install-vim-plugin command which seems to have installed it fine (I see ~/.vim/bundle/vim-sbt).

However, when I startup vim and hit <leader>ff, nothing happens. I inspect :echo &rtp in vim and I don't see vim-sbt on there so I'm guessing Vundle won't add things to the runtimepath unless it's installed through Vundle itself.

I tried adding the directory manually via

set runtimepath^=~/.vim/bundle/vim-sbt/plugin

But that didn't work either (though it does appear in :echo &rtp).

The contents of ~/.vim/bundle/vim-sbt match the resources folder in the repository. Below are what I have in the ~/.sbt/0.13 folder

// global.sbt
import com.dscleaver.sbt.SbtQuickFix.QuickFixKeys._

vimEnableServer := false

// plugins/plugins.sbt
addSbtPlugin("com.dscleaver.sbt" % "sbt-quickfix" % "0.4.1")

Any guidance would be appreciated - thanks!

Hard dependency on gvim executable

I get the following error in my SBT console: java.io.IOException: Cannot run program "gvim": error=2, No such file or directory

I use terminal vim as opposed to gvim. As far as I know, there isn't a reason that sbt-quickfix specifically depends on gvim, so it would be really nice if it could work with terminal vim as well. I'm happy to set a custom option if gvim is the preferred default.

I suspect the following line is the culprit:

vimExecutable in ThisBuild := (if (System.getProperty("os.name").startsWith("Win")) "gvim.bat" else "gvim")

errorformat truncating multi-line messages

The errorformat being used only seems to get the first line of multi-line errors in the quickfix file. This may have to do with how the quickfix file is generated. On the console, I see:

[error] /home/dylan/databrary/app/models/audit.scala:17: type mismatch;
[error]  found   : scala.concurrent.Future[Option[models.Party]]
[error]  required: Option[models.Party]

In sbt.quickfix, I see:

[error] /home/dylan/databrary/app/models/audit.scala:17: type mismatch;
 found   : scala.concurrent.Future[Option[models.Party]]
 required: Option[models.Party]

But in vim, I see:

models/audit.scala|17 col 69 error| type mismatch;

If I set errorformat as follows instead, things seem to work fine:

set errorformat=%E\ %#[error]\ %#%f:%l:\ %m,%-Z\ %#[error]\ %p^,%-C\ %#[error]\ %m,%C\ %m
set errorformat+=%W\ %#[warn]\ %#%f:%l:\ %m,%-Z\ %#[warn]\ %p^,%-C\ %#[warn]\ %m,%C\ %m
set errorformat+=%-G%.%#

Use cgetfile instead of cfile

The plugin currently uses cfile to load the quickfixfile into vim. This can be annoying and disrupting. I'd suggest to rather use cgetfile, which loads the quickfix files but doesn't make the cursor move. This way it's up to the users to handle changes in the quickfixlist as they like -- e.g. by defining a QuickFixCmdPost autocommand.

BTW one minor annoyance I found is that the plugin always uses the first gvim server. This can be a problem when users have multiple instances of gvim open. It would be nice if they could define somehow whether they want the sbt plugin to use a specific server.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.