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

Add standardized program-gen reporting helpers #11032

Merged
merged 1 commit into from Oct 18, 2022

Conversation

iwahbe
Copy link
Member

@iwahbe iwahbe commented Oct 14, 2022

This PR introduces a shared format for reporting codegen problems.

Description

Fixes #10988

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have run make changelog and committed the changelog/pending/<file> documenting my change
  • Yes, there are changes in this PR that warrants bumping the Pulumi Service API version

@iwahbe iwahbe self-assigned this Oct 14, 2022
@iwahbe iwahbe marked this pull request as draft October 14, 2022 20:46
@pulumi-bot
Copy link
Contributor

pulumi-bot commented Oct 14, 2022

Changelog

[uncommitted] (2022-10-18)

Features

  • [programgen] Add error reporting infrastructure
    #11032

@iwahbe iwahbe marked this pull request as ready for review October 14, 2022 22:36
}

// Report a new call to GenerateProgram. Every call should be reported.
func (r *reporter) Report(title, language string, files []*syntax.File, f GenerateProgramFn) GenerateProgramFn {
Copy link
Member

Choose a reason for hiding this comment

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

Include a unit test of the output?

Copy link
Member

@AaronFriel AaronFriel left a comment

Choose a reason for hiding this comment

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

Would make sense to add a test, even if just to show an example of how to use the reporter

@iwahbe iwahbe force-pushed the iwahbe/10988/add-codegen-report branch from 1cb5a41 to 7785f31 Compare October 18, 2022 17:53
Initial  Report

CL

Fix timestamps

Add files

Add example
@iwahbe iwahbe force-pushed the iwahbe/10988/add-codegen-report branch from 7785f31 to b3a38cc Compare October 18, 2022 17:54
@iwahbe
Copy link
Member Author

iwahbe commented Oct 18, 2022

Would make sense to add a test, even if just to show an example of how to use the reporter

Examples have been added.

@iwahbe
Copy link
Member Author

iwahbe commented Oct 18, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 18, 2022

Build succeeded:

@bors bors bot merged commit d084ab9 into master Oct 18, 2022
@pulumi-bot pulumi-bot deleted the iwahbe/10988/add-codegen-report branch October 18, 2022 23:05
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.

Standardize PCL->$LANG error reporting format
4 participants