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 ourterms of serviceand privacy statement.We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[config-plugins] improve invalid config error message #31936

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

vonovak
Copy link
Contributor

@vonovak vonovak commented Oct 9, 2024

Why

closes#31601

the snapshot update (2nd commit) is unrelated to other changes

How

makes the error message more helpful

Test Plan

tests pass

Checklist

Copy link
Contributor Author

vonovak commented Oct 9, 2024

This stack of pull requests is managed by Graphite.Learn more about stacking.

Join@vonovakand the rest of your teammates onGraphiteGraphite

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Oct 9, 2024
@vonovak vonovak marked this pull request as ready for review October 9, 2024 09:58
Copy link
Contributor

github-actions bot commented Oct 9, 2024

Subscribed to pull request

File Patterns Mentions
packages/@expo/config-plugins/** @EvanBacon,@brentvatne

Generated byCodeMention

@expo-bot
Copy link
Collaborator

expo-bot commented Oct 9, 2024

The Pull Request introduced fingerprint changes against the base commit:12a79eb

Fingerprint diff
[
{
"op":"changed",
"source":{
"type":"file",
"filePath":"../../packages/@expo/config-plugins/build/plugins/withPlugins.js",
"reasons":[
"expoConfigPlugins"
],
"hash":"2dcdd47f0b22b399c631a92e68e304c50549a29c"
}
},
{
"op":"changed",
"source":{
"type":"file",
"filePath":"../../packages/@expo/config-plugins/build/plugins/withStaticPlugin.js",
"reasons":[
"expoConfigPlugins"
],
"hash":"afe3b37f7a7149009f7bb2237083902a8f71f2f9"
}
}
]

Generated byPR labeler🤖

@vonovak vonovak marked this pull request as draft October 9, 2024 10:22
@vonovak vonovak force-pushed the @vonovak/_config-plugins_improve_invalid_config_error_message branch from 577ebb6 to 5d3b717 Compare October 9, 2024 13:23
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Oct 9, 2024
@vonovak vonovak marked this pull request as ready for review October 9, 2024 13:24
@vonovak vonovak force-pushed the @vonovak/_config-plugins_improve_invalid_config_error_message branch 3 times, most recently from 326e4b4 to 2bfd773 Compare October 18, 2024 12:38
Copy link
Member

@byCedric byCedric left a comment

Choose a reason for hiding this comment

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

I don't have a strong opinion on having multi-linePluginErrormessage, let's see how that works in practice.

The error message itself:

  • Avoid using "please" in errors, mostly to sound more confident
  • Simplified the multi-line error's first line to closely match the normalPluginErrormessage for non-objects
  • I'm not sure if "consult" is the easiest for non-native English speakers (I asked claude), used "See" instead.
Claude's take onconsult

image

@vonovak vonovak force-pushed the @vonovak/_config-plugins_improve_invalid_config_error_message branch from b1db2da to 3faadee Compare October 21, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PluginError when using plugins with parameters
3 participants