Git Product home page Git Product logo

Comments (7)

jakebailey avatar jakebailey commented on June 5, 2024

I highly suspect this is a buffering problem with the child process; node's stdio support is really fickle and when I made this action, I had to make a bunch of changes to pyright in order to ensure that it didn't exit before it had a change to write all of its output.

I haven't seen any changes to pyright's CLI output code, so I'm going to guess that this is now a buffering problem on the action's side because it reads the output over stdin. (If it comes to it, I could probably modify pyright to write data via IPC or something; that would probably be a good change no matter what.)

On your local copy, can you pipe the JSON output to a file and then tell me its size in bytes?

from pyright-action.

cbrxyz avatar cbrxyz commented on June 5, 2024

Sure, looks to be about 700KB.

$ pyright NaviGator/gnc/navigator_controller/nodes/gps_to_baselink_odom.py ... --outputjson --pythonplatform=Linux --pythonversion=3.8 > test.json
$ wc -c test.json
727669 

from pyright-action.

jakebailey avatar jakebailey commented on June 5, 2024

Hm, that doesn't seem all that large, really.

Is this repo available for me to test with, by chance?

from pyright-action.

cbrxyz avatar cbrxyz commented on June 5, 2024

Thanks for looking into this. You should be able to clone our repo (https://github.com/uf-mil/mil) - it's a bit of a monorepo, so it's not super tiny, unfortunately.

We've recently started migrating our Python 2 code to Python 3 on the noetic-migration branch, so you'll just need to check out that branch after cloning. The work done on the GitHub Actions pipeline has been on noetic-ci-improvements, which branched off of noetic-migration a few days ago.

That should be enough to at least run pyright!

from pyright-action.

jakebailey avatar jakebailey commented on June 5, 2024

I was able to copy the command run from your CI task and run it locally; the size of the output for the most recent run is actually ~1.4MB. The default buffer size Node uses for child processes is 1MB, so it's probable that this is part of the problem (the output is so huge). I can try and bump this number up higher and see if that helps, but it's definitely the case that your project is so huge that things are really hitting the limit (especially given pyright uses JSON.stringify to produce its output, which is not streaming).

from pyright-action.

jakebailey avatar jakebailey commented on June 5, 2024

Can you try out v1.4.0, which I've just released?

from pyright-action.

cbrxyz avatar cbrxyz commented on June 5, 2024

Works like a charm; thank you Jake! Sorry about reporting the incorrect size of the errors earlier.

from pyright-action.

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.