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

"assignment to discriminant changes object branch" #9

Open
stefantalpalaru opened this issue Nov 29, 2019 · 4 comments
Open

"assignment to discriminant changes object branch" #9

stefantalpalaru opened this issue Nov 29, 2019 · 4 comments

Comments

@stefantalpalaru
Copy link
Contributor

Compile time:

/mnt/sda3/storage/CODE/status/nim-beacon-chain/vendor/nim-confutils/confutils.nim(597, 27) Warning: Potential object case transition, instantiate new object instead [CaseTransition]
/mnt/sda3/storage/CODE/status/nim-beacon-chain/vendor/nim-confutils/confutils.nim(599, 27) Warning: Potential object case transition, instantiate new object instead [CaseTransition]

Run time (in nim-beacon-chain, running make eth2_network_simulation):

Error while processing the 'cmd' parameter:
assignment to discriminant changes object branch; compile with -d:nimOldCaseObjects for a transition period
@zah
Copy link
Contributor

zah commented Nov 29, 2019

The new more restrictive behavior of the Nim case object makes life too difficult for libraries such as nim-seriazation and nim-confutils. For this reason, I recommend setting -d:nimOldCaseObjects globally for all of our projects. I'll try to negotiate a new Nim feature that will solve the problem in the long run.

@stefantalpalaru
Copy link
Contributor Author

setting -d:nimOldCaseObjects globally

I just did that for nim-beacon-chain. Will do the same for Nimbus.

@mratsim
Copy link

mratsim commented Jul 24, 2020

See also: nim-lang/RFCs#56

@jangko
Copy link
Contributor

jangko commented Feb 20, 2022

still need support from nim compiler to fix this issue, see this bug nim-lang/Nim#19547

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

No branches or pull requests

4 participants