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

refactor: make components and logger optional #70

Closed
wants to merge 1 commit into from

Conversation

paralin
Copy link

@paralin paralin commented Dec 1, 2023

In previous releases of yamux the following was supported:

import { yamux } from '@chainsafe/libp2p-yamux'
const muxer = yamux()()

Now the following is required:

import { yamux } from '@chainsafe/libp2p-yamux'
const muxer = yamux()({logger: ...})

Adjust the code to support passing an empty logger and an empty Components.

Fixes #69

In previous releases of yamux the following was supported:

import { yamux } from '@chainsafe/libp2p-yamux'
const muxer = yamux()()

Now the following is required:

import { yamux } from '@chainsafe/libp2p-yamux'
const muxer = yamux()({logger: ...})

Adjust the code to support passing an empty logger and an empty Components.

Fixes ChainSafe#69

Signed-off-by: Christian Stewart <christian@aperture.us>
@paralin paralin requested review from achingbrain and a team as code owners December 1, 2023 02:23
paralin added a commit to aperturerobotics/starpc that referenced this pull request Dec 1, 2023
Update dependencies and fix various breaking changes introduced by those
dependency updates:

 - Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
 - Pass a logger stub to yamux as it's now required.

The logger stub should not be necessary once these are fixed:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
paralin added a commit to aperturerobotics/starpc that referenced this pull request Dec 1, 2023
NOTE: The following issues must be addressed before this is merged:

libp2p/interface is currently held at version 0.1.2:

 - Passing a logger to MuxerInit is now required (should be optional?): libp2p/js-libp2p#2275

@chainsafe/libp2p-yamux is currently held at version 5.0.4:

 - Passing a logger to yamux()({logger:...}) is now required (should be optional?): ChainSafe/js-libp2p-yamux#69
 - The integration test for rpcstream fails with 6.x vs. 5.x: ChainSafe/js-libp2p-yamux#71 and https://github.com/aperturerobotics/starpc/actions/runs/7055030516/job/19204891175

See: #120

---

Update dependencies and fix various breaking changes introduced by those
dependency updates:

- Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
- Pass a logger stub to yamux as it's now required.

The logger stub should not be necessary once these are fixed:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
paralin added a commit to aperturerobotics/starpc that referenced this pull request Dec 11, 2023
NOTE: The following issues must be addressed before this is merged:

libp2p/interface is currently held at version 0.1.2:

 - Passing a logger to MuxerInit is now required (should be optional?): libp2p/js-libp2p#2275

@chainsafe/libp2p-yamux is currently held at version 5.0.4:

 - Passing a logger to yamux()({logger:...}) is now required (should be optional?): ChainSafe/js-libp2p-yamux#69
 - The integration test for rpcstream fails with 6.x vs. 5.x: ChainSafe/js-libp2p-yamux#71 and https://github.com/aperturerobotics/starpc/actions/runs/7055030516/job/19204891175

See: #120

---

Update dependencies and fix various breaking changes introduced by those
dependency updates:

- Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
- Pass a logger stub to yamux as it's now required.

The logger stub should not be necessary once these are fixed:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
paralin added a commit to aperturerobotics/starpc that referenced this pull request Jan 10, 2024
NOTE: The following issues must be addressed before this is merged:

libp2p/interface is currently held at version 0.1.2:

 - Passing a logger to MuxerInit is now required (should be optional?): libp2p/js-libp2p#2275

@chainsafe/libp2p-yamux is currently held at version 5.0.4:

 - Passing a logger to yamux()({logger:...}) is now required (should be optional?): ChainSafe/js-libp2p-yamux#69
 - The integration test for rpcstream fails with 6.x vs. 5.x: ChainSafe/js-libp2p-yamux#71 and https://github.com/aperturerobotics/starpc/actions/runs/7055030516/job/19204891175

See: #120

---

Update dependencies and fix various breaking changes introduced by those
dependency updates:

- Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
- Pass a logger stub to yamux as it's now required.

The logger stub should not be necessary once these are fixed:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
@paralin
Copy link
Author

paralin commented Jan 10, 2024

I give up on this and will just pass a stub Log from now on.

@paralin paralin closed this Jan 10, 2024
paralin added a commit to aperturerobotics/starpc that referenced this pull request Jan 10, 2024
 - Passing a logger to MuxerInit is now required
 - Passing a logger to yamux()({logger:...}) is now required

See: #120

Update dependencies and fix various breaking changes introduced by those
dependency updates:

- Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
- Pass a logger stub to yamux as it's now required.

Related:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
paralin added a commit to aperturerobotics/starpc that referenced this pull request Jan 17, 2024
 - Passing a logger to MuxerInit is now required
 - Passing a logger to yamux()({logger:...}) is now required

See: #120

Update dependencies and fix various breaking changes introduced by those
dependency updates:

- Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
- Pass a logger stub to yamux as it's now required.

Related:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
paralin added a commit to aperturerobotics/starpc that referenced this pull request Jan 17, 2024
 - Passing a logger to MuxerInit is now required
 - Passing a logger to yamux()({logger:...}) is now required

See: #120

Update dependencies and fix various breaking changes introduced by those
dependency updates:

- Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
- Pass a logger stub to yamux as it's now required.

Related:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
paralin added a commit to aperturerobotics/starpc that referenced this pull request Feb 7, 2024
 - Passing a logger to MuxerInit is now required
 - Passing a logger to yamux()({logger:...}) is now required

See: #120

Update dependencies and fix various breaking changes introduced by those
dependency updates:

- Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
- Pass a logger stub to yamux as it's now required.

Related:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
paralin added a commit to aperturerobotics/starpc that referenced this pull request Feb 7, 2024
 - Passing a logger to MuxerInit is now required
 - Passing a logger to yamux()({logger:...}) is now required

See: #120

Update dependencies and fix various breaking changes introduced by those
dependency updates:

- Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
- Pass default logger to yamux as it's now required.

Related:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
paralin added a commit to aperturerobotics/starpc that referenced this pull request Feb 9, 2024
 - Passing a logger to MuxerInit is now required
 - Passing a logger to yamux()({logger:...}) is now required

See: #120

Update dependencies and fix various breaking changes introduced by those
dependency updates:

- Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
- Pass default logger to yamux as it's now required.

Related:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
paralin added a commit to aperturerobotics/starpc that referenced this pull request Feb 10, 2024
 - Passing a logger to MuxerInit is now required
 - Passing a logger to yamux()({logger:...}) is now required

See: #120

Update dependencies and fix various breaking changes introduced by those
dependency updates:

- Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
- Pass default logger to yamux as it's now required.
 - We need to pass a Uint8ArrayList to the WebSocket it-ws.

Related:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
paralin added a commit to aperturerobotics/starpc that referenced this pull request Feb 10, 2024
 - Passing a logger to MuxerInit is now required
 - Passing a logger to yamux()({logger:...}) is now required

See: #120

Update dependencies and fix various breaking changes introduced by those
dependency updates:

- Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
- Pass default logger to yamux as it's now required.
 - We need to pass a Uint8ArrayList to the WebSocket it-ws.

Related:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
paralin added a commit to aperturerobotics/starpc that referenced this pull request Feb 10, 2024
 - Passing a logger to MuxerInit is now required
 - Passing a logger to yamux()({logger:...}) is now required

See: #120

Update dependencies and fix various breaking changes introduced by those
dependency updates:

- Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
- Pass default logger to yamux as it's now required.
 - We need to pass a Uint8ArrayList to the WebSocket it-ws.

Related:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
paralin added a commit to aperturerobotics/starpc that referenced this pull request Feb 10, 2024
 - Passing a logger to MuxerInit is now required
 - Passing a logger to yamux()({logger:...}) is now required

See: #120

Update dependencies and fix various breaking changes introduced by those
dependency updates:

- Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
- Pass default logger to yamux as it's now required.
 - We need to pass a Uint8ArrayList to the WebSocket it-ws.

Related:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
paralin added a commit to aperturerobotics/starpc that referenced this pull request Feb 10, 2024
 - Passing a logger to MuxerInit is now required
 - Passing a logger to yamux()({logger:...}) is now required

See: #120

Update dependencies and fix various breaking changes introduced by those
dependency updates:

- Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
- Pass default logger to yamux as it's now required.
 - We need to pass a Uint8ArrayList to the WebSocket it-ws.

Related:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
paralin added a commit to aperturerobotics/starpc that referenced this pull request Feb 10, 2024
 - Passing a logger to MuxerInit is now required
 - Passing a logger to yamux()({logger:...}) is now required

See: #120

Update dependencies and fix various breaking changes introduced by those
dependency updates:

- Change type of Conn to Duplex<Uint8Array | Uint8ArrayList>
- Pass default logger to yamux as it's now required.
 - We need to pass a Uint8ArrayList to the WebSocket it-ws.

Related:

- ChainSafe/js-libp2p-yamux#69
- libp2p/js-libp2p#2275
- ChainSafe/js-libp2p-yamux#70

Signed-off-by: Christian Stewart <christian@aperture.us>
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.

Passing a logger is now required
1 participant