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

Error if globs don't match any input files #215

Open
aomarks opened this issue May 11, 2022 · 1 comment
Open

Error if globs don't match any input files #215

aomarks opened this issue May 11, 2022 · 1 comment

Comments

@aomarks
Copy link
Member

aomarks commented May 11, 2022

We should error if a glob in the files array doesn't match any files.

Note we have to do this at Execution time, not Analysis time, because the input files might not exist before dependencies execute.

Also note currently we can only do this crudely: "are any files matched by these input globs" because we don't have insight into which specific globs matched, because we delegate globbing to fast-glob.

However, a new replacement globbing library is in progress, which will allow tracing every entry to the original glob that produced it.

@aomarks aomarks moved this to 💬 Needs Discussion in Lit Project Board Jun 10, 2022
@aomarks aomarks moved this from 💬 Needs Discussion to 📋 Triaged in Lit Project Board Jun 10, 2022
@cefn
Copy link

cefn commented Dec 1, 2022

This would have unfortunate consequences for optional files. For example, I currently have a rule for my Vitest target, which includes a match for the optional vite.config.ts and vitest.config.ts files even though they are not there.

That way, if I add one, the specialisation is respected as part of the test definition, but it's legitimate for it to be missing (which causes the suite to run with Vitest fallbacks).

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