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

fix #12293 findNimStdLibCompileTime should not break with nimble install compiler #14334

Merged
merged 2 commits into from
May 18, 2020

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented May 13, 2020

# with nimble develop
cd $nim
NIMBLE_DIR=$HOME/.nimble_fake24 nimble develop
# or, with nimble install for any version recent enough to have this patch:
NIMBLE_DIR=$HOME/.nimble_fake24 nimble install https://github.com/timotheecour/Nim@#pr_fix_findNimStdLibCompileTime

# then:
NIMBLE_DIR=$HOME/.nimble_fake24 nim r $timn_D/tests/nim/all/t10738.nim
# t10738.nim:
import compiler/[nimeval, llstream]
import os
proc evalString(code: string, moduleName = "script.nim") =
  let stream = llStreamOpen(code)
  let lib = findNimStdLibCompileTime()
  var intr = createInterpreter(moduleName, [lib, lib / "pure", lib / "core"])
  intr.evalScript(stream)
  destroyInterpreter(intr)
  llStreamClose(stream)

let runtimeString = "echo \"Hello World\""
evalString(runtimeString)

@timotheecour timotheecour marked this pull request as ready for review May 13, 2020 15:14
@timotheecour timotheecour requested a review from Araq May 14, 2020 01:30
@timotheecour timotheecour force-pushed the pr_fix_findNimStdLibCompileTime branch from ca68fc2 to c6e95e3 Compare May 17, 2020 04:22
@timotheecour
Copy link
Member Author

timotheecour commented May 17, 2020

PTAL
CI failure unrelated: #14090 re-ran

@Araq Araq merged commit b11ff51 into nim-lang:devel May 18, 2020
@timotheecour timotheecour deleted the pr_fix_findNimStdLibCompileTime branch May 18, 2020 08:04
EchoPouet pushed a commit to EchoPouet/Nim that referenced this pull request Jun 13, 2020
…ble install compiler (nim-lang#14334)

* fix nim-lang#12293 findNimStdLibCompileTime should not break with nimble install compiler

* address comment to unblock PR
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.

compiler as a library: findNimStdLibCompileTime fails to find system.nim
2 participants