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

chore: Bump nimbus and nim to latest available - nim-2.0.12 #3188

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

NagyZoltanPeter
Copy link
Contributor

@NagyZoltanPeter NagyZoltanPeter commented Nov 29, 2024

Description

To unstuck waku-sync v2 we need to move to latest nim version.
Currently it is 2.0.12

Changes

  • nimbus-build-system is bumped to latest master that includes nim v2.0.12

Note:

Currently, this new nim version breaks our code. We need to investigate if it is possible to adjust nim flags for backward compatible build or we can easily adjust our code.

Example error appears with latest nim version:

/home/nzp/dev/status/nwaku/waku/waku_api/rest/debug/types.nim(50, 31) template/generic instantiation of `unrecognizedFieldWarning` from here
/home/nzp/dev/status/nwaku/vendor/nim-chronicles/chronicles.nim(380, 10) template/generic instantiation of `log` from here
/home/nzp/dev/status/nwaku/waku/waku_api/rest/serdes.nim(28, 50) Warning: a new symbol 'value' has been injected during template or generic instantiation, however overloads of value will be used instead; either enable --experimental:openSym to use the injected symbol, or `bind` this symbol explicitly [IgnoredSymbolInjection]
/home/nzp/dev/status/nwaku/waku/waku_api/rest/debug/types.nim(50, 31) template/generic instantiation of `unrecognizedFieldWarning` from here
/home/nzp/dev/status/nwaku/vendor/nim-chronicles/chronicles.nim(380, 10) template/generic instantiation of `log` from here
/home/nzp/dev/status/nwaku/waku/waku_api/rest/serdes.nim(28, 50) Error: ambiguous identifier: 'value' -- use one of the following:
  results.value: proc (self: var Result[value.T, value.E]): var T: not void{.inline, noSideEffect.}
  results.value: proc (self: Result[system.void, value.E]){.inline, noSideEffect.}
  results.value: proc (self: Result[value.T, value.E]): lent T: not void{.inline, noSideEffect.}

Issue

#3204

@NagyZoltanPeter
Copy link
Contributor Author

Seems recent change in nim-restul/result.nim, that defines on the fly template named value collide in json readValue's procs where unrecognizedFieldWarning template expects also to a variable named value. It resulted ambiguous type resolution in our template with result.value proc.

Eliminating this value expectation in unrecognizedFieldWarning let our code compile with nim 2.0.12

Copy link

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:3188

Built from 0e1f311

@NagyZoltanPeter NagyZoltanPeter marked this pull request as ready for review December 10, 2024 13:01
Copy link
Collaborator

@Ivansete-status Ivansete-status left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for it! 💯

Copy link
Contributor

@SionoiS SionoiS left a comment

Choose a reason for hiding this comment

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

LGTM

@NagyZoltanPeter NagyZoltanPeter merged commit e2b7149 into master Dec 10, 2024
12 of 13 checks passed
@NagyZoltanPeter NagyZoltanPeter deleted the chore-bump-nim-to-2-0-12 branch December 10, 2024 13:42
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