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

Stub unavailable source when reporting Starlark errors #693

Merged
merged 3 commits into from
Jun 27, 2022

Conversation

pkg/template/compiled_template_error.go Outdated Show resolved Hide resolved
pkg/template/compiled_template_error.go Outdated Show resolved Hide resolved
pkg/template/compiled_template_error.go Outdated Show resolved Hide resolved
pkg/template/compiled_template_error.go Outdated Show resolved Hide resolved
- record the fact that we intend for this to be a temporary fallback
  strategy: that we still aspire to supply offending lines of source
  even if not part of the Library under evaluation.
// - a function from another Library
// - Starlark sourced from within ytt (e.g. out-of-the-box validation functions)
sc = e.loader.FindCompiledTemplate(pos.Filename())
if reflect.ValueOf(sc).IsNil() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

required idiom as sc is an interface, not a pointer.

@pivotaljohn pivotaljohn merged commit ce3fdf7 into develop Jun 27, 2022
@pivotaljohn pivotaljohn deleted the handle-unavail-source branch June 27, 2022 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants