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

Module paths with / as separator are broken in Windows #93

Open
keithfancher opened this issue Feb 3, 2024 · 3 comments
Open

Module paths with / as separator are broken in Windows #93

keithfancher opened this issue Feb 3, 2024 · 3 comments

Comments

@keithfancher
Copy link

Discovered while working on this HLS PR: haskell/haskell-language-server#4023, related to these issues:

Stan, via extensions, appears to be prepending the hs-source-dirs from the .cabal file verbatim onto the module name. This means if the .cabal file uses / as its path separators, the returned file paths (and associated extension map) will be broken for Windows users.

For example, if your cabal file has:

  hs-source-dirs: extension-tests/language-pragma

... then the resulting Map key winds up looking like this for Windows users:

extension-tests/language-pragma\\LanguagePragmaTest.hs

This results in Map lookups missing, which in turn results in Stan not recognizing any of a project's enabled extensions. (One of the causes for the above-mentioned HLS issue.)

From a quick look, I think the issue might be happening around here somewhere. (I do see some Cabal version checks, not sure how those play into this...)

@tomjaguarpaw
Copy link
Collaborator

Thanks for the report. stan and extensions have very little active maintainership currently. I'm happy to oversee and advise a patch to fix this, but I won't have time to do it myself any time in the near future. Perhaps @0rphee is interested?

@tomjaguarpaw
Copy link
Collaborator

The first thing to do would be to produce an example that demonstrates the current behaviour, as simply as possible.

@0rphee
Copy link

0rphee commented Feb 6, 2024

Probably I won't be able to work on this for the foreseeable future, maybe in a few months.. :)

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

3 participants