question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

applyTo: closedDocuments and a custom owner caused errors to leak/persist

See original GitHub issue

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.67.2
  • OS Version: macOS 12.3.1

Steps to Reproduce:

  1. Create a tsup project with the following task:
    {
    	"owner": "tsup",
    	"source": "tsup",
    	"applyTo": "closedDocuments",
    	"severity": "error",
    	"pattern":[
    		{
    			"regexp": "^✘\\s+\\[ERROR\\]\\s+(.+)$",
    			"message": 1
    		},
    		{
    			"regexp": "^\\s*$"
    		},
    		{
    			"regexp": "^\\s+(.+):(\\d+):(\\d+):$",
    			"file": 1,
    			"line": 2,
    			"column": 3
    		}
    	],
    	"background": {
    		"beginsPattern": "^CJS Build start$",
    		"endsPattern": "^CJS .* Build success|^CJS Build failed"
    	}
    },
    
  2. Introduce a syntax error in a ts file like just typing % in a line.
  3. Open/close the file, the error doesn’t disappear on opening the file.
  4. The error persists even after fixing the error in the file.

Removing "applyTo": "closedDocuments" makes it work. It appears like applyTo is getting messed up with a custom owner like tsup that isn’t the language of the file or something?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
segevfinercommented, May 23, 2022

It has to be a syntax error, so just an “s” which is valid syntax but a type checking error won’t trigger a tsup error. I also had to close the file and reopen it to trigger this for some reason.

@meganrogge Can you try again using a % and saving, closing, and reopening the file, after adding it?

Thanks!

0reactions
meganroggecommented, May 23, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found