Skip to content

Improve a diagnostic's location#211

Merged
rictic merged 4 commits intomainfrom
better-missing-script-error
May 11, 2022
Merged

Improve a diagnostic's location#211
rictic merged 4 commits intomainfrom
better-missing-script-error

Conversation

@rictic
Copy link
Copy Markdown
Member

@rictic rictic commented May 11, 2022

When a script has a wireit config but not an entry in the scripts section, we should squiggle under the wireit config name if present.

We also give it a different reason code, so that we don't supercede this error message with an error about a mising dependency, as that's confusing. The dependency is present more or less, it's just improperly set up, so it's more helpful to tell the user about that improper setup than to just say that we couldn't find the dep.

rictic added 2 commits May 11, 2022 09:45
When a script has a wireit config but not an entry in the scripts section, we should squiggle under the wireit config name if present.

We also give it a different reason code, so that we don't supercede this error message with an error about a mising dependency, as that's confusing. The dependency is present more or less, it's just improperly set up, so it's more helpful to tell the user about that improper setup than to just say that we couldn't find the dep.
@rictic rictic requested a review from aomarks May 11, 2022 14:46
Comment thread src/test/errors-analysis.test.ts Outdated
})
);

test.only(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove only

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eep! Done

Also added an eslint pass to prevent this in the future and verified that it flagged this instance.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

Copy link
Copy Markdown
Member

@aomarks aomarks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry clicked wrong radio button, an only needs to be removed

@rictic rictic requested a review from aomarks May 11, 2022 16:14
@rictic rictic enabled auto-merge (squash) May 11, 2022 16:21
@rictic rictic merged commit 28a91e8 into main May 11, 2022
@rictic rictic deleted the better-missing-script-error branch May 11, 2022 16:59
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