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

Fix scanning of names with import prefix #2929

Conversation

janmasrovira
Copy link
Collaborator

@janmasrovira janmasrovira commented Jul 30, 2024

  1. When the flatparse scanner fails and we fallback to megaparsec, a warning is issued.
  2. The flatparse scanner has been fixed so it is not confused when a name starts with import.

@janmasrovira janmasrovira self-assigned this Jul 30, 2024
@janmasrovira janmasrovira force-pushed the 2927-a-variable-with-the-prefix-import-causes-a-crash-due-to-import-scanning branch 2 times, most recently from a0c7242 to 4f5d428 Compare July 30, 2024 15:59
@janmasrovira janmasrovira marked this pull request as ready for review July 30, 2024 16:36
@janmasrovira janmasrovira force-pushed the 2927-a-variable-with-the-prefix-import-causes-a-crash-due-to-import-scanning branch from 4f5d428 to e41813b Compare July 30, 2024 21:52
@janmasrovira janmasrovira merged commit 3a9eb20 into main Jul 31, 2024
4 checks passed
@janmasrovira janmasrovira deleted the 2927-a-variable-with-the-prefix-import-causes-a-crash-due-to-import-scanning branch July 31, 2024 08:02
janmasrovira added a commit that referenced this pull request Aug 2, 2024
- In #2925, the flatparse scanner
always fails for .md files and silently falls back to megaparsec.
- In #2929, a warning is introduced
that informs the user when the fallback parser is being used. This is
causing a warning every time we scan a markdown file.
- This pr fixes the problem by changing the default strategy to directly
use megaparsec when a .md file is given.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A variable with the prefix import causes a crash due to import scanning
2 participants