Giter VIP home page Giter VIP logo

Comments (10)

Neki avatar Neki commented on May 12, 2024

From my understanding, the goal of neomake_serialize is not to cancel previous unfinished jobs.

If you have two makers e.g. let g:neomake_python_enable_makers = ['pylint', 'frosted'], then setting neomake_serialize to 1 will run pylint once frosted has returned instead of starting both checkers at once.

Previous jobs are indeed not cancelled when :Neomake is called again. We could add a separate option to do this.

from neomake.

pcaneill avatar pcaneill commented on May 12, 2024

@Neki Okay, but here in my first use case I save 4 times my files and it launch 4 pylint in parallel.

Is it normal with neomake_serialize set to 1?

from neomake.

Neki avatar Neki commented on May 12, 2024

Yes, because saving four times your file trigger four separate :Neomake commands. Each command spawns a job, and :Neomake does not cancel previous jobs even if neomake_serialize is set to 1. The goal of this option is not to cancel jobs.

In fact, if you have only one checker for your file (in this case, pylint), neomake_serialize has no effect. What I think you need is another option that tells neomake to cancel unfinished jobs when you call :Neomake.

from neomake.

Neki avatar Neki commented on May 12, 2024

If you have two configured makers (pylint and frosted for instance), then this option prevents :Neomake to spawn two jobs (pylint + frosted) when you call :Neomake. It does not affect the interaction between different :Neomake calls.

from neomake.

pcaneill avatar pcaneill commented on May 12, 2024

Ok I understood.

I thought that neomake-serialize serialized different jobs, but no it serialized in a job the different makers.

How about :

  • neomake-serialize-makers (actual behavior)
  • neomake-serialize (no more than one job at the time)

And a new option that would do smth like this:

  • if we run a maker job on a file and that their already is a maker running for that file, kill the first one and start the second job

from neomake.

benekastah avatar benekastah commented on May 12, 2024

Actually there is a bug here, but not with the serialize feature as @Neki correctly pointed out. When Neomake runs a maker, it should cancel any outstanding jobs created by that maker. The intent is that there is only at most one job per maker active at any given time (and that the job is always the most up-to-date one). In the code (see earlier link), it looks like we are canceling the old job shortly after creating the new one, which should perhaps be corrected. Beyond that, I'm not sure what the issue is at the moment.

from neomake.

pcaneill avatar pcaneill commented on May 12, 2024

My issue is that if I save 4 times my file I have 4 pylint running for several seconds. And I just want the last one to be running.

When you say shortly after, does it means seconds?

from neomake.

Neki avatar Neki commented on May 12, 2024

After reading the code again (sorry I missed the part where jobs should be cancelled), it means "after a few lines of code" - so it is more like milliseconds.

I would investigate but I am bitten by neovim/neovim#2309 too, so neomake does not work at all for me now.

from neomake.

benekastah avatar benekastah commented on May 12, 2024

Let me know how this fix works for you. The new job kills the old job, and then waits until the old job exits and is cleaned up before running. It seems to be working fine for me and should guarantee that you never have two jobs from the same maker going at once.

from neomake.

pcaneill avatar pcaneill commented on May 12, 2024

The fix works for me.

Sorry for the late response I was in vacation.

Thanks !

from neomake.

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.