Skip to content

Conversation

SuchitraSwain
Copy link

…ironment

Title

Description

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

@SuchitraSwain SuchitraSwain requested a review from a team as a code owner September 11, 2025 20:24
@SuchitraSwain SuchitraSwain changed the title [3273] @libp2p/utils/merge-options is blowing the stack in a wasm env… fix: [3273] @libp2p/utils/merge-options is blowing the stack in a wasm env… Sep 12, 2025
@SuchitraSwain SuchitraSwain changed the title fix: [3273] @libp2p/utils/merge-options is blowing the stack in a wasm env… fix: [3273] @libp2p/utils/merge-options is blowing the stack Sep 12, 2025
"@chainsafe/libp2p-noise": "^16.1.4",
"@libp2p/tcp": "^10.1.14",
"libp2p": "^2.8.9"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why dependencies are being added?

Copy link
Member

@achingbrain achingbrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this. In addition to @dozyio's comment, in #3273 I suggest removing the mergeOptions function entirely, it's only used in the keychain and to create the libp2p config so is a bit superfluous.

Each component that receives an init object should be in charge of inspecting it and/or setting default values, ideally through shallow (e.g. one level deep) property access, then we don't need the deep-merge functionality of mergeOptions.

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

Successfully merging this pull request may close these issues.

3 participants