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

Report errors in import statements. #73

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Kripner
Copy link

@Kripner Kripner commented Feb 17, 2025

Solves the problem that invalid import statements were not reported as errors.

Before:

{"cmd": "import BlahBlahBlah"}

{"env": 0}

After:

{"cmd": "import BlahBlahBlah"}

{"messages":
 [{"severity": "error",
   "pos": {"line": 1, "column": 0},
   "endPos": null,
   "data":
   "unknown module prefix 'BlahBlahBlah'\n\nNo directory 'BlahBlahBlah' or file 'BlahBlahBlah.olean' in the search path entries:\n././.lake/packages/Cli/.lake/build/lib\n././.lake/packages/batteries/.lake/build/lib\n././.lake/packages/Qq/.lake/build/lib\n././.lake/packages/aesop/.lake/build/lib\n././.lake/packages/proofwidgets/.lake/build/lib\n././.lake/packages/importGraph/.lake/build/lib\n././.lake/packages/LeanSearchClient/.lake/build/lib\n././.lake/packages/plausible/.lake/build/lib\n././.lake/packages/mathlib/.lake/build/lib\n././.lake/build/lib\n/home/m/.elan/toolchains/leanprover--lean4---v4.15.0/lib/lean\n/home/m/.elan/toolchains/leanprover--lean4---v4.15.0/lib/lean"}],
 "env": 0}

Similarly, invalid import statements were not reported when processing a file using {"path": "..."}, which is now fixed.

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

Successfully merging this pull request may close these issues.

1 participant