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

Fixing error message for custom entrypoint #101

Conversation

henryc-stripe
Copy link
Contributor

@henryc-stripe henryc-stripe commented Jan 25, 2022

Summary

Skycfg's entrypoint is usually a main() function, but users are allowed to specify a custom function name if they wish. However, error messages always have the entrypoint hardcoded to "main", which is confusing for users specifying a custom entrypoint.

For example, if a user has a custom entrypoint function named my_entrypoint and uses the option skycfg.WithEntryPoint("my_entryponit") (which has a typo), they will be presented with the error message no 'main' function found in "file.sky", while a more appropriate error message would be no 'my_entryponit' function found in "file.sky". This PR changes the error message so it always uses the entrypoint provided by the user.

@henryc-stripe henryc-stripe changed the title [wip] Fixing error message for custom entrypoint Fixing error message for custom entrypoint Jan 25, 2022
@seena-stripe seena-stripe self-assigned this Jan 25, 2022
Copy link
Collaborator

@seena-stripe seena-stripe left a comment

Choose a reason for hiding this comment

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

LGTM!

@seena-stripe seena-stripe merged commit 4571141 into stripe:trunk Jan 25, 2022
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