print background compile errors ASAP (#2596)

This commit is contained in:
jackie-pc 2024-02-13 12:02:37 -08:00 committed by GitHub
parent b5f06991a9
commit b130dd07cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,7 +11,10 @@ if "app" != constants.CompileVars.APP:
app_module = get_app(reload=False)
app = getattr(app_module, constants.CompileVars.APP)
ThreadPoolExecutor(max_workers=1).submit(app.compile_)
# Force background compile errors to print eagerly
ThreadPoolExecutor(max_workers=1).submit(app.compile_).add_done_callback(
lambda f: f.result()
)
# ensure only "app" is exposed.
del app_module