Coder Social home page Coder Social logo

progress test fail about dax HOT 11 CLOSED

dsherret avatar dsherret commented on July 27, 2024
progress test fail

from dax.

Comments (11)

dsherret avatar dsherret commented on July 27, 2024 1

Yeah, that's what I meant by "I see some async code that's not being awaited". It should have been awaited and forgot to because we don't have floating promise detection in deno lint (kind of annoying and wish we had it). I updated the code now so this issue and those unawaited promises should be fixed.

(I'm going to do a release later tonight probably)

from dax.

dsherret avatar dsherret commented on July 27, 2024

What version of Deno are you running the tests with?

from dax.

sigmaSd avatar sigmaSd commented on July 27, 2024
linux
deno 1.29.1+7ce2b58 (canary, x86_64-unknown-linux-gnu)
v8 10.9.194.5
typescript 4.9.4

from dax.

dsherret avatar dsherret commented on July 27, 2024

Also, what's the full call stack at src/console/utils.ts#L166?

from dax.

sigmaSd avatar sigmaSd commented on July 27, 2024

I added log(new Error().stack!;) there

Error
    at getStaticText (file:///home/mrcool/dev/deno/others/dax/src/console/utils.ts:166:17)
    at refresh (file:///home/mrcool/dev/deno/others/dax/src/console/logger.ts:19:28)
    at Object.setItems (file:///home/mrcool/dev/deno/others/dax/src/console/logger.ts:15:10)
    at forceRender (file:///home/mrcool/dev/deno/others/dax/src/console/progress/interval.ts:52:10)
    at ProgressBar.forceRender (file:///home/mrcool/dev/deno/others/dax/src/console/progress/mod.ts:132:5)
    at file:///home/mrcool/dev/deno/others/dax/mod.test.ts:885:6
    at testStepSanitizer (deno:cli/js/40_testing.js:448:13)
    at asyncOpSanitizer (deno:cli/js/40_testing.js:147:15)
    at resourceSanitizer (deno:cli/js/40_testing.js:374:13)
    at Object.exitSanitizer [as fn] (deno:cli/js/40_testing.js:431:15)

from dax.

dsherret avatar dsherret commented on July 27, 2024

Ok thanks! I see some async code that's not being awaited. I will look into it.

from dax.

dsherret avatar dsherret commented on July 27, 2024

That makes no sense it ends up there because forceRender will exit if !isInteractiveConsole. Maybe the debugger makes stdin a tty somehow so that changes the behaviour. How are you running the tests?

from dax.

dsherret avatar dsherret commented on July 27, 2024

Oh, maybe I need to check that stderr is a tty as well. That will probably fix it. I'll open a PR

from dax.

sigmaSd avatar sigmaSd commented on July 27, 2024

I tested it and that fixes it

from dax.

sigmaSd avatar sigmaSd commented on July 27, 2024

just one more javascript question, so this doesn't need to be awaited

logger.setItems(LoggerRefreshItemKind.ProgressBars, items, size);
? even if it internally returns an async function (refresh)
async function refresh(size?: ConsoleSize) {

from dax.

sigmaSd avatar sigmaSd commented on July 27, 2024

I see, thanks for fixing it so quickly!

because we don't have floating promise detection in deno lint

definitely would be a nice upgrade

from dax.

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.