-
Notifications
You must be signed in to change notification settings - Fork 10
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 name does not match file name with Idris2 #12
Comments
Thanks for making an issue, I'm able to reproduce this 👍 Just to make sure I'm fixing the right problem, are you using version 0.2.1? I've read through this, and as far as I understand, the IDE process used to find the ipkg file on its own, but now the caller is expected to locate it. If the ipkg isn't manually loaded, it doesn't account for the sourcedir. I'll take a look at it this week. As a temporary workaround, you can always rename your module to just |
I'm using: |
This should hopefully be working in the latest version, but please reopen if you still have problems. One thing to note is that the workspace needs to correspond to the Idris project directory, so it may not work if you open the parent directory of your project. |
There seems to be some weirdness with file paths. I noticed this when clicking on an error in the problems pane. I get
|
The v1 protocol returns absolute file paths for file errors, while the v2 protocol in 0.2.1 has relative file paths. If Idris2 Mode is checked, it prepends the workspace path so that I get a correct file uri — which I need to attach errors to a window. But your error sounds like it has returned absolute file paths and the extension is over-correcting. I've had a quick skim of the Idris2 code, and it looks like each error is responsible for capturing its own location including filename, which could mean that some errors return absolute file paths and some relative. Or it could be something else. It occurred to me as I was typing that rather than rely on the Idris2 Mode, it's probably easier just to check whether it's an absolute or relative file path, so that should be a pretty easy fix. |
Can you try version 0.0.6? |
It initially appears to work. I'll let you know if I run into any bugs. |
I'm running into this in v0.0.9 of the extension using v0.3.0 of Idris2 (I think commit 299a31de5bd64a584a2f7d9090eb2f5680efaeac). Occurs with or without an .ipkg file. |
Sorry, I haven't had time to investigate. I'll try to have a look sometime this week. |
I used the following settings, but it seems like this would only work if I was working on one package at a time: {
"idris.idrisPath": "idris2",
"idris.idris2Mode": true,
"idris.processArgs": ["--find-ipkg", "--source-dir experiments/idris"]
} |
Module name (name) does not match file name
How can I fix this error?
idris2 --build main.ipkg --cg javascript
works.My source files are in
src
and the module and file names are the same.The text was updated successfully, but these errors were encountered: