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

[minor] --path: silently gives wrong results with relative paths #12984

Open
timotheecour opened this issue Dec 28, 2019 · 1 comment
Open

[minor] --path: silently gives wrong results with relative paths #12984

timotheecour opened this issue Dec 28, 2019 · 1 comment

Comments

@timotheecour
Copy link
Member

--path doesn't work well when given a relative path in some cases at least; eg --path:. (or --path:compiler/..) fails below (down the line, not immediately) whereas --path:$(pwd) (or using explicit absolute path) works

Example

  • create /mypathto/extend_aux.nim containing:
import std/nre
import compiler/ast
  • add import extend_aux at the end of ./compiler/nim.nim in nim sources (for example at latest devel, b67dea7)

  • recompile nim as follows:

 bin/nim c --skipUserCfg -o:/tmp/nim --stylecheck:off --path:/mypathto/ --noNimblePath --path:. compiler/nim.nim

fails with --path:.
fails with other equivalent relative paths eg --path:compiler/..
works with equivalent absolute path eg --path:$(pwd)

Current Output

/Users/timothee/git_clone/nim/Nim_devel/lib/impure/nre.nim(351, 27) Error: undeclared identifier: 'none'

Expected Output

works

Additional Information

D20191228T161300
at nim devel b67dea7

@timotheecour timotheecour changed the title nim c --path: silently gives wrong results with relative paths --path: silently gives wrong results with relative paths Dec 28, 2019
@timotheecour timotheecour changed the title --path: silently gives wrong results with relative paths [minor] --path: silently gives wrong results with relative paths Dec 28, 2019
@metagn
Copy link
Collaborator

metagn commented Aug 28, 2023

Maybe #22065 has mitigated this? Above instructions are very cumbersome, can't tell what the problem is at a glance

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

2 participants