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

nim-bindings: Lift restriction of yaml test on Nim v2.x #431

Merged
merged 1 commit into from
May 28, 2024

Conversation

jangko
Copy link
Contributor

@jangko jangko commented May 28, 2024

No description provided.

@jtraglia
Copy link
Member

Hmm I would love for this to work. I tested it with nim v2.0.4 (from homebrew) it still doesn't work though.

jtraglia at xanax in ~/c-kzg-4844/bindings/nim (enable-yaml-test)
$ brew upgrade nim && nim -v && nim test
Warning: nim 2.0.4 already installed
Nim Compiler Version 2.0.4 [MacOSX: arm64]
Compiled at 2024-03-28
Copyright (c) 2006-2023 by Andreas Rumpf

active boot switches: -d:release -d:nimUseLinenoise
>>>>>>>>>>>>>>>> Run tests in DEBUG mode <<<<<<<<<<<<<<<<
/Users/jtraglia/.nimble/pkgs/yaml-1.0.0/yaml/stream.nim(115, 3) Error: undeclared identifier: 'shallowCopy'
candidates (edit distance, scope distance); see '--spellSuggest':
 (6, 4): 'alloc'
 (6, 4): 'alloc0'
 (6, 4): 'allocImpl'
stack trace: (most recent call last)
/opt/homebrew/Cellar/nim/2.0.4/nim/lib/system/nimscript.nim(421, 18)
/Users/jtraglia/c-kzg-4844/bindings/nim/config.nims(26, 13) testTask
/Users/jtraglia/c-kzg-4844/bindings/nim/config.nims(19, 3) runAllTest
/Users/jtraglia/c-kzg-4844/bindings/nim/config.nims(14, 3) test
/opt/homebrew/Cellar/nim/2.0.4/nim/lib/system/nimscript.nim(265, 7) exec
/opt/homebrew/Cellar/nim/2.0.4/nim/lib/system/nimscript.nim(265, 7) Error: unhandled exception: FAILED: nim c  -d:debug --outdir:build -r -f --hints:off --warnings:off --skipParentCfg /Users/jtraglia/c-kzg-4844/bindings/nim/tests/test_all [OSError]

@jtraglia
Copy link
Member

Also tested with build from source (nim-lang/Nim @ devel) and it doesn't work either.

jtraglia at xanax in ~/c-kzg-4844/bindings/nim (enable-yaml-test)
$ nim -v && nim test
Nim Compiler Version 2.1.1 [MacOSX: arm64]
Compiled at 2024-05-28
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: d923c581c118b9ea891785bbb828c3cdede587b4
active boot switches: -d:release
>>>>>>>>>>>>>>>> Run tests in DEBUG mode <<<<<<<<<<<<<<<<
/Users/jtraglia/.nimble/pkgs/yaml-1.0.0/yaml/stream.nim(115, 3) Error: undeclared identifier: 'shallowCopy'
candidates (edit distance, scope distance); see '--spellSuggest':
 (6, 4): 'alloc'
 (6, 4): 'alloc0'
 (6, 4): 'allocImpl'
stack trace: (most recent call last)
/Users/jtraglia/Projects/nimlang/Nim/lib/system/nimscript.nim(420, 18)
/Users/jtraglia/c-kzg-4844/bindings/nim/config.nims(26, 13) testTask
/Users/jtraglia/c-kzg-4844/bindings/nim/config.nims(19, 3) runAllTest
/Users/jtraglia/c-kzg-4844/bindings/nim/config.nims(14, 3) test
/Users/jtraglia/Projects/nimlang/Nim/lib/system/nimscript.nim(263, 7) exec
/Users/jtraglia/Projects/nimlang/Nim/lib/system/nimscript.nim(263, 7) Error: unhandled exception: FAILED: nim c  -d:debug --outdir:build -r -f --hints:off --warnings:off --skipParentCfg /Users/jtraglia/c-kzg-4844/bindings/nim/tests/test_all [OSError]

@jangko
Copy link
Contributor Author

jangko commented May 28, 2024

Your yaml lib is outdated, that is one problem with nimble. Currently the CI is using nim 2.0 and latest yaml lib and it works fine.

@jtraglia
Copy link
Member

Ah. Yes that was the issue. I was still using yaml-1.0.0, not the new version.

It's a bit weird, even after updating yaml (via nimble) it still defaulted to using the old yaml package. I had to manually remove the old one from the pkgs directory. After doing that, it worked just fine.

rm -rf ~/.nimble/pkgs/yaml-1.0.0

@jtraglia jtraglia merged commit b870532 into ethereum:main May 28, 2024
38 checks passed
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.

2 participants