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

Choosenim fails with "ambiguous call" in rst.nim #10602

Closed
koranza opened this issue Feb 7, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@koranza
Copy link
Contributor

commented Feb 7, 2019

"choosenim update devel" fails with the following output:

   Building Nim
 Exception: choosenim.nim(206)       choosenim
        ... choosenim.nim(183)       performAction
        ... choosenim.nim(153)       update
        ... choosenim.nim(46)        installVersion
        ... builder.nim(91)          build
        ... builder.nim(45)          buildCompiler
        ... utils.nim(19)            doCmdRaw
        ... Execution failed with exit code 1
        ... Command: ./koch boot -d:release
        ... Output: iteration: 1
        ... compiler/nim0 c  --skipUserCfg --skipParentCfg -d:nimBoostrapCsources0_19_0 -d:release --nimcache:nimcache/r_linux_amd64 compiler/nim.nim

# SKIPPING SOME OUTPUT

... Hint: rst [Processing]
... ../lib/packages/docutils/rst.nim(780, 6) Error: ambiguous call; both rstast.add(father: PRstNode, s: string)[declared in ../lib/packages/docutils/rstast.nim(92, 6)] and rstast.add(father: PRstNode, son: PRstNode)[declared in ../lib/packages/docutils/rstast.nim(89, 6)] match for: (PRstNode, nil)
... FAILURE
Tip: 7 messages have been suppressed, use --verbose to show them.
Error: choosenim.nim(206)       choosenim
... choosenim.nim(183)       performAction
... choosenim.nim(153)       update
... choosenim.nim(46)        installVersion
... builder.nim(100)         build
... Build failed

Possible Solution

Not sure, but changing lines 780 and 1541 of rst.nim to be 'add(result,"")' instead of 'add(result,nil)' makes it build sucessfully

Additional Information

  • This fails on my Linux VM (Manjaro) but not on my Windows 10 computer
$ nim -v
Nim Compiler Version 0.19.0 [Linux: amd64]
Compiled at 2018-09-26
Copyright (c) 2006-2018 by Andreas Rumpf

git hash: f6c5c636bb1a1f4e1301ae0ba5a8afecef439132
active boot switches: -d:release
@Araq

This comment has been minimized.

Copy link
Member

commented Feb 8, 2019

0.19 does not have nil for strings so it cannot be ambiguous.

@narimiran

This comment has been minimized.

Copy link
Member

commented Feb 8, 2019

I'm using Manjaro and when I used to do choosenim update devel I never experienced this.

As I cannot reproduce (nor can you on Windows), can you first try to do choosenim update stable, which should update your Nim to 0.19.4, and then try to run choosenim update devel? Is it still the same error?

rstast.add(father: PRstNode, s: string) should not match for: (PRstNode, nil)

@Araq Araq closed this in 4572568 Feb 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.