Skip to content

fix(init): freshly generated go project doesn't build #22310

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

Merged
merged 6 commits into from Oct 3, 2022
Merged

fix(init): freshly generated go project doesn't build #22310

merged 6 commits into from Oct 3, 2022

Conversation

ghost
Copy link

@ghost ghost commented Sep 30, 2022

The import for jsii is commented out, but jsii.Close() is called in the code, so the project won't build. Unommented the jsii import.

To reproduce or test:

mkdir hello-cdk
cd hello-cdk
cdk init --language go
go get
go build

The go build step fails with .\hello-cdk.go:32:8: undefined: jsii before the fix, succeeds afterward.


All Submissions:

Sorry, something went wrong.

Jerry Kindall and others added 5 commits September 9, 2022 16:19

Verified

This commit was signed with the committer’s verified signature.
cplee Casey Lee

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
JSII import is required since the code uses `jsii.String()`
@gitpod-io
Copy link

gitpod-io bot commented Sep 30, 2022

@github-actions github-actions bot added the p2 label Sep 30, 2022
@aws-cdk-automation aws-cdk-automation requested a review from a team September 30, 2022 15:28
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Sep 30, 2022
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The Pull Request Linter fails with the following errors:

❌ Fixes must contain a change to a test file.
❌ Fixes must contain a change to an integration test file and the resulting snapshot.

PRs must pass status checks before we can provide a meaningful review.

@aws-cdk-automation aws-cdk-automation dismissed their stale review September 30, 2022 15:29

Pull Request updated. Dissmissing previous PRLinter Review.

Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The Pull Request Linter fails with the following errors:

❌ Fixes must contain a change to a test file.
❌ Fixes must contain a change to an integration test file and the resulting snapshot.

PRs must pass status checks before we can provide a meaningful review.

@ghost ghost added the pr-linter/exempt-test The PR linter will not require test changes label Sep 30, 2022
@aws-cdk-automation aws-cdk-automation dismissed their stale review September 30, 2022 16:56

Pull Request updated. Dissmissing previous PRLinter Review.

Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The Pull Request Linter fails with the following errors:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

PRs must pass status checks before we can provide a meaningful review.

@ghost ghost closed this Sep 30, 2022
@ghost ghost reopened this Sep 30, 2022
@ghost ghost dismissed aws-cdk-automation’s stale review September 30, 2022 18:18

this PR does not require changes to an integration test; pr-linter/exempt-test tag added

Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The Pull Request Linter fails with the following errors:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

PRs must pass status checks before we can provide a meaningful review.

@ghost ghost added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Sep 30, 2022
@ghost ghost dismissed aws-cdk-automation’s stale review September 30, 2022 18:20

also needed to be excluded from integration test

@TheRealAmazonKendra
Copy link
Contributor

How has this been manually tested?

@ghost
Copy link
Author

ghost commented Oct 3, 2022

@TheRealAmazonKendra Added reproduction/test steps.

@TheRealAmazonKendra TheRealAmazonKendra changed the title fix(init): Freshly-generated Go project doesn't build fix(init): freshly generated go project doesn't build Oct 3, 2022
@mergify
Copy link
Contributor

mergify bot commented Oct 3, 2022

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: b5c8269
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit c6a4e71 into aws:main Oct 3, 2022
@mergify
Copy link
Contributor

mergify bot commented Oct 3, 2022

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

arewa pushed a commit to arewa/aws-cdk that referenced this pull request Oct 8, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
The import for `jsii` is commented out, but `jsii.Close()` is called in the code, so the project won't build. Unommented the `jsii` import.

To reproduce or test:

```
mkdir hello-cdk
cd hello-cdk
cdk init --language go
go get
go build
```

The `go build` step fails with `.\hello-cdk.go:32:8: undefined: jsii` before the fix, succeeds afterward.


----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)
homakk pushed a commit to homakk/aws-cdk that referenced this pull request Dec 1, 2022
The import for `jsii` is commented out, but `jsii.Close()` is called in the code, so the project won't build. Unommented the `jsii` import.

To reproduce or test:

```
mkdir hello-cdk
cd hello-cdk
cdk init --language go
go get
go build
```

The `go build` step fails with `.\hello-cdk.go:32:8: undefined: jsii` before the fix, succeeds afterward.


----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes pr-linter/exempt-test The PR linter will not require test changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants