You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. attempting to import a local package on windows
What is the expected output? What do you see instead?
The package should import. Error "can't find import"
In the importfile function of lex.c, once a local package is identified,
by a call to islocalname, the fully qualified file name is assembled and
findpkg is called. findpkg makes a call to islocalname with the fully
qualified file name (fqfn) and on windows the call will always fail.
E.g. say we have: import "./svg"
The importfile function makes a call to islocalname with "./svg", if the
call passes the fqfn is assembled and findpkg is called. Contrasting fqfns:
- OSX: /Users/jpoirier/svgo/svg
- Windows: C:\Users/jpoirier/svgo/svg
findpkg calls islocalname passing the fqfn as a parameter. islocalname
checks the first few characters of the fqfn against "/", "./", or
"../"
which always fails on windows because of the unique fqfn.