-
Notifications
You must be signed in to change notification settings - Fork 8
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
(include mod)
depends on CWD / fennel.path value
#128
Comments
Seems it uses (fn search-module [modulename ?pathstring]
(let [pathsepesc (escapepat pkg-config.pathsep)
pattern (: "([^%s]*)%s" :format pathsepesc pathsepesc)
no-dot-module (modulename:gsub "%." pkg-config.dirsep)
fullpath (.. (or ?pathstring utils.fennel-module.path)
pkg-config.pathsep)]
(fn try-path [path]
(let [filename (path:gsub (escapepat pkg-config.pathmark) no-dot-module)
filename2 (path:gsub (escapepat pkg-config.pathmark) modulename)]
(match (or (io.open filename) (io.open filename2))
file (do
(file:close)
filename)
_ (values nil (.. "no file '" filename "'")))))
Which uses Testing
|
rktjmp
changed the title
Jan 6, 2024
(include mod)
not functional?(include mod)
depends on CWD / fennel.path value
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hm..
test/macros.fnl
does use include and builds without issues.Using elsewhere seem fails to find the module.
fennel.include
hit the regular infra or use its own file searcher?The text was updated successfully, but these errors were encountered: