You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The constructor of EnvVariablesServerImpl unconditionally does a console.log(); see code here
This is just bad practice. I get the value the author tried to provide, but applications should be in control of informational logging and not have it forced on them by the platform or by libraries. I can also see the the viewpoint that it's one statement that's logged at startup--what's the harm? In that scenario, there really is not much harm at all. But now consider an extensive unit test suite with many test functions that end up instantiating that object. Each such test now writes that line out. Tests normally don't write anything out. And so now you have a test report with, potentially, dozens or hundreds of lines of this noise.
Can the tests suppress the writes? Sure. We can and have taken measures to deal with this situation, but it's non-trivial and hackish. And ultimately, it shouldn't be necessary. I'm hoping this can be addressed in Theia so we can remove the mitigation in our test framework.
Steps to Reproduce:
N/A
Additional Information
N/A
The text was updated successfully, but these errors were encountered:
Bug Description:
The constructor of
EnvVariablesServerImpl
unconditionally does aconsole.log()
; see code hereThis is just bad practice. I get the value the author tried to provide, but applications should be in control of informational logging and not have it forced on them by the platform or by libraries. I can also see the the viewpoint that it's one statement that's logged at startup--what's the harm? In that scenario, there really is not much harm at all. But now consider an extensive unit test suite with many test functions that end up instantiating that object. Each such test now writes that line out. Tests normally don't write anything out. And so now you have a test report with, potentially, dozens or hundreds of lines of this noise.
Can the tests suppress the writes? Sure. We can and have taken measures to deal with this situation, but it's non-trivial and hackish. And ultimately, it shouldn't be necessary. I'm hoping this can be addressed in Theia so we can remove the mitigation in our test framework.
Steps to Reproduce:
N/A
Additional Information
N/A
The text was updated successfully, but these errors were encountered: