Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnvVariablesServerImpl constructor shouldn't unconditionally log #13855

Open
jcortell68 opened this issue Jun 27, 2024 · 1 comment
Open

EnvVariablesServerImpl constructor shouldn't unconditionally log #13855

jcortell68 opened this issue Jun 27, 2024 · 1 comment

Comments

@jcortell68
Copy link
Contributor

jcortell68 commented Jun 27, 2024

Bug Description:

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

@JonasHelming
Copy link
Contributor

@martin-fleck-at

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants