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

wstransport.nim: Rng -> ref HmacDrbgContext. 'nim-websock' did the same. #952

Closed
wants to merge 1 commit into from

Conversation

Ivansete-status
Copy link
Contributor

@Ivansete-status Ivansete-status commented Sep 21, 2023

This PR is aimed to fix a compilation issue in the nwaku repo.

I we update the nim-websock vendor to its latest state, then the nim-libp2p doesn't compile because the Rng type is not found.

The reason why that happens is that the next commit removed the Rng type ( ref HmacDrbgContext, websock/utils.nim ) from nim-websock:

status-im/nim-websock@f8ed9b4

Therefore, this PR removes the dependency with Rng type and uses the original type: ref HmacDrbgContext.


This is the compilation error that happens in nwaku if nim-websock is in f8ed9b40a5ff27ad02a3c237c4905b0924e3f982 and nim-libp2p is in 41649f0:

/home/ivansete/workspace/status/nwaku/waku/waku_archive/driver/queue_driver/queue_driver.nim(271, 3) Warning: catch a more precise Exception deriving from CatchableError or Defect. [BareExcept]
/home/ivansete/workspace/status/nwaku/vendor/nim-libp2p/libp2p/transports/wstransport.nim(114, 10) Error: undeclared identifier: 'Rng'
candidates (edit distance, scope distance); see '--spellSuggest': 
 (2, 2): 'And' [enumField declared in /home/ivansete/workspace/status/nwaku/vendor/nim-libp2p/libp2p/multiaddress.nim(43, 13)]
 (2, 2): 'And' [enumField declared in /home/ivansete/workspace/status/nwaku/vendor/nim-libp2p/libp2p/multiaddress.nim(43, 13)]

In the next nim-websock commit, the "type Rng" has been removed:

status-im/nim-websock@f8ed9b4
@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

❗ No coverage uploaded for pull request base (unstable@41649f0). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             unstable     #952   +/-   ##
===========================================
  Coverage            ?   83.05%           
===========================================
  Files               ?       91           
  Lines               ?    15238           
  Branches            ?        0           
===========================================
  Hits                ?    12656           
  Misses              ?     2582           
  Partials            ?        0           

@Menduist
Copy link
Contributor

Menduist commented Sep 21, 2023

Duplicate of #939 (not sure why github let that through)

@Menduist Menduist closed this Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: done
Development

Successfully merging this pull request may close these issues.

2 participants