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

Source file not in directory "." on every file #3

Open
xiaopong opened this issue Jun 27, 2021 · 1 comment
Open

Source file not in directory "." on every file #3

xiaopong opened this issue Jun 27, 2021 · 1 comment

Comments

@xiaopong
Copy link

xiaopong commented Jun 27, 2021

It just reports error

Error: Source file "/path/to/source/file.idr" is not in the source directory "." Idris2 [1, 1]

on all .idr files that compile perfectly fine.

New to Idris and not a vscode extension programmer, so just taking a guess here: the source file path should be relative instead of an absolute file path?

Environment:
Idris 2, version 0.4.0-f77670814
with latest idris2-lsp.

@chespinoza
Copy link

chespinoza commented Jul 2, 2021

Hi @xiaopong, it's an issue due to a missing local ipkg file, in order to create it just run idris2 --init in the folder where you have your files and enter the package name:

➜  idris2-stuff idris2 --init

Package name: my-package
Package authors:
Package options:
Source directory:

After that open your file again, that should sort the problem out.
Here you can read more about packages: https://idris2.readthedocs.io/en/latest/reference/packages.html

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

2 participants