Coder Social home page Coder Social logo

Flymake/Flycheck about malabar-mode HOT 12 CLOSED

m0smith avatar m0smith commented on September 2, 2024
Flymake/Flycheck

from malabar-mode.

Comments (12)

m0smith avatar m0smith commented on September 2, 2024

Same as buzztaiki#11

from malabar-mode.

m0smith avatar m0smith commented on September 2, 2024

Flycheck requires an external command. This one seems to work:

emacsclient -e "(malabar-compile-files 
                 (list \"c:/Users/Smith/projects/tester/src/main/java/LabChar.java\") nil)"

from malabar-mode.

m0smith avatar m0smith commented on September 2, 2024

emacsclient -e "(malabar-compile-buffer "App.java" t) " works even better

from malabar-mode.

m0smith avatar m0smith commented on September 2, 2024

Info on extending flycheck http://flycheck.github.io/Extending.html

from malabar-mode.

m0smith avatar m0smith commented on September 2, 2024

I decided to shell out to javac directly. If flycheck/flycheck#169 is ever completed, I will look at calling the compiler using Groovy instead.

from malabar-mode.

m0smith avatar m0smith commented on September 2, 2024

Added malabar-flycheck. To enable, load that file.

from malabar-mode.

rob5n avatar rob5n commented on September 2, 2024

So if I understand correctly, you are hoping for flycheck to be able to call a function that requests the running malabar JVM to do a compile, similar to the existing way malabar compiles a file (using Compile.groovy). But at the moment flycheck has to run a program in a new process for each check it makes, so you cannot do that directly.

You are going to have flymake run a shell calling javac. Won't that be very slow? Couldn't you have it run something light that communicates with the existing malabar groovy JVM to do a compile?

(In any case I'm grateful for you adding this feature)

from malabar-mode.

m0smith avatar m0smith commented on September 2, 2024

You understand correctly.

I had planned to use emacsclient to call the running emacs but the further I got down that path, the more problems I encountered. I was going to have to do some things to capture the output and redirect it for instance.

I did some experiments with javac and at least on my boxes the performance was more than adequate. I have been using it for a day or so and it has not caused any problems or slowdowns. To be honest I was pleasantly surprised with how well it behaved.

I will continue to monitor flycheck/flycheck#169. When it is completed I will look at then calling Compile.groovy instead.

You are welcome. It is nice to be appreciated.

from malabar-mode.

rob5n avatar rob5n commented on September 2, 2024

I'm trying this out, but it's not working quite as expected.

When I make an edit in a buffer, like type a char or delete one, I don't get any syntax error highlighting and the following message is printed to the minibuffer (briefly) and Messages buffer:
Blocking call to accept-process-output with quit inhibited

When I save the buffer it does do the error highlighting and I don't get the above error.

I can confirm that javac does get run while editing the buffer; I can see the time on the class file in target/flycheck/... change. (BTW, the compile on my box is very quick, just as you found it to be).

I installed flycheck from elpa a few days ago (20140121.147). I'm using Emacs 24.3. Are you experiencing this problem?

Perhaps on a related matter, when I use the latest source from git for the malabar lisp, I get the following error in messages buffer when starting:
Loading semantic/wisent/javat-wy.elc...done Loading semantic/wisent/javat-wy.elc...done Loading semantic/wisent/javat-wy.elc...done ... {{dozens of times}}
But when I use the malabar lisp package from ELPA I don't have this problem.

from malabar-mode.

m0smith avatar m0smith commented on September 2, 2024

I had noticed the "Blocking call ... " but wasn't sure what it meant. I will look into it.

I just pushed a new version of malabar-mode to ELPA. Try it out and see if you still get the Loading semantic/wisent/javat-wy.elc...done That is not something I have ever noticed.

Be sure and delete the ~/malabar_mode/classpath as part of the install so you get the latest code.

from malabar-mode.

m0smith avatar m0smith commented on September 2, 2024

The Blocking call message is an emacs "bug" as far as I can tell. It happens when you call an external program (like javac) from a timer, as flycheck would do.

Related to the Blocking call issue

quit is inhibited when running timers, process-filters and other
such asynchronous events.
So comint doesn't need to inhibit-quit itself for such a warning to show
up, if its code is executed from a process-filter.

Try to figure out how/when a process-filter (or timer...) can end up
running the while + accept-process-output loop, and then think about
whether that really should happen, and if so make sure the
process-filter (or timer...) uses with-local-quit before running
that loop.

from malabar-mode.

m0smith avatar m0smith commented on September 2, 2024

I opened an issue with flycheck on the Blocking call to accept-process-output with quit inhibited!! [12 times] I'll open a new issue if we can find a resolution with flycheck

from malabar-mode.

Related Issues (20)

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.