-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
import ./modulename
ignores the ./
path prefix
#22065
Comments
I think there is no special casing for relative paths, it just checks import ../sugar # compiles because of lib/pure/collections/../sugar
import ../tables # fails There might be related issues here or in https://github.com/nim-lang/RFCs with the keyword "relative" |
Yeah, generally related RFCs:
|
+1 on this, |
That's the final thing I wanted to do for 2.0. |
…ng#22073) * fixes nim-lang#22065; do not search path for "./" * simplify * fixes * fixes * allow ".." * cleanup * add a test case * slightly modify the import * adds a changelog
Description
even in a directory with no
tables.nim
or other way of finding atables
module` to import, compiles.https://nim-lang.org/docs/manual.html#modules-import-statement doesn't seem to explicitly document what should happen in this situation, but "." is a way of specifying a path. Indeed, attempting to import
./std/tables
, for example, does not work, because it is being treated as a path, so there's an inconsistency here at least.Nim Version
Current Output
Expected Output
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: