Skip to content

Update regex pattern in shouldDropLine#184

Open
walseb wants to merge 2 commits intojosephsumabat:mainfrom
walseb:patch-1
Open

Update regex pattern in shouldDropLine#184
walseb wants to merge 2 commits intojosephsumabat:mainfrom
walseb:patch-1

Conversation

@walseb
Copy link
Contributor

@walseb walseb commented Nov 5, 2025

Ref: #183

I haven't had time to try this change yet. Perhaps there are issues with it.

@walseb
Copy link
Contributor Author

walseb commented Nov 5, 2025

I have tried this change out briefly, but now I sometimes get errors with this:

Could not find module ‘MV’.
 Use :set -v to see a list of the files searched for.
| [GHC-87110]

What's abnormal is this: | [GHC-87110]

Which isn't even shown in the GHCIWatch output for some reason.

I will try adjusting the regexp by adding a check for whether BOL is to the left of the bar.

@walseb
Copy link
Contributor Author

walseb commented Nov 5, 2025

That didn't fix it. Is | [GHC-87110] supposed to be there, and I just haven't noticed it before?

It seems to be appearing in the beginning of all errors now.

@josephsumabat
Copy link
Owner

I've wanted to fix the parsing for a bit (we actually have a different set up on our internal fork..) but if you can get this tested working I'll happily merge.

@walseb
Copy link
Contributor Author

walseb commented Nov 8, 2025

I have been testing this over the last few days with no issues.

I suppose the BOL check in the regexp might be unnecessary. I have never seen the error line preview bars appear at the beginning of a line:
[^\s]+\|[\s$]+

But it might be possible, and I don't see a reason to remove it as it doesn't conflict with anything that I know of (especially as the last solution would capture ANY bars used in the line at all).

@walseb
Copy link
Contributor Author

walseb commented Nov 9, 2025

I forgot to mention:

That didn't fix it. Is | [GHC-87110] supposed to be there, and I just haven't noticed it before?
It seems to be appearing in the beginning of all errors now.

Regarding that, | [GHC-87110] appears even without my changes. I believe it's actually the error code. As for why it appears at the end of errors, I don't know, but it's not relevant to this issue I believe.

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.

2 participants