X Tutup
The Wayback Machine - https://web.archive.org/web/20210113155308/https://github.com/nodejs/node/pull/36902
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

process: runtime deprecate changing process.config #36902

Open
wants to merge 1 commit into
base: master
from

Conversation

@jasnell
Copy link
Member

@jasnell jasnell commented Jan 12, 2021

The fact that process.config is mutable has long made it
unreliable when it really should just work. Start the process
of deprecating the ability to change it.

Fixes: #7803
Signed-off-by: James M Snell jasnell@gmail.com

The fact that `process.config` is mutable has long made it
unreliable when it really should just work. Start the process
of deprecating the ability to change it.

Fixes: #7803
Signed-off-by: James M Snell <jasnell@gmail.com>
@targos
Copy link
Member

@targos targos commented Jan 13, 2021

Do we have evidence that what people do is replacing the entire object? Intuitively I would say that it's more likely they change individual properties on it.

@jasnell
Copy link
Member Author

@jasnell jasnell commented Jan 13, 2021

There were examples that I saw long ago (2015/16) timeframe that changed the whole object but I haven't seen it in a very long time and haven't been able to dig any up recently. I've never seen an application/module that changes individual properties on it.

@targos
Copy link
Member

@targos targos commented Jan 13, 2021

I found https://github.com/BitGo/key-recovery-service-v2 which replaces the object. How about we also warn if any of the original properties are changed?

@jasnell
Copy link
Member Author

@jasnell jasnell commented Jan 13, 2021

How about we also warn if any of the original properties are changed?

I'd just be worried about the performance cost on start up going through those objects. I guess we could wrap it in a proxy object tho.

@targos
Copy link
Member

@targos targos commented Jan 13, 2021

I guess we could wrap it in a proxy object tho.

That's what I had in mind

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

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.
X Tutup