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

Support codeOnly for Go in jsii-pacmak #2848

Closed
1 of 7 tasks
ansgarm opened this issue May 20, 2021 · 3 comments
Closed
1 of 7 tasks

Support codeOnly for Go in jsii-pacmak #2848

ansgarm opened this issue May 20, 2021 · 3 comments
Assignees
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@ansgarm
Copy link
Contributor

ansgarm commented May 20, 2021

🚀 Feature Request

Affected Languages

  • TypeScript or Javascript
  • Python
  • Java
  • .NET (C#, F#, ...)
  • Go

General Information

  • JSII Version: 1.29.0
  • Platform:
  • I may be able to implement this feature request
  • This feature might incur a breaking change

Description

Currently jsii-pacmak seems to create a go.mod file even if --code-only is supplied.
Is there a reason for that?

Proposed Solution

Don't generate / include a go.mod in the output directory if codeOnly: true / --code-only is set for jsii-pacmak.

@ansgarm ansgarm added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 20, 2021
@MrArnoldPalmer
Copy link
Contributor

So --code-only doesn't mean to only generate source files, it means to not to build the package. In java, when you run --code-only, pom.xml is still generated with a list of dependencies, we just don't run mvn build and create a .jar file.

With Go, since the source code is the package artifact, the only difference with --code-only is that we don't create local.go.mod and run go build against that to verify that compilation occurs.

This is expected behavior. Can I ask what the use case is that you don't want to create go.mod?

@ansgarm
Copy link
Contributor Author

ansgarm commented May 21, 2021

Ah, thank you for the clarification, @MrArnoldPalmer 👍

The background is jsii-srcmak, where we decided to integrate just the Go code into the Go project of a user.
Currently the go.mod is simply deleted after copying everything and I just thought we could get rid of that step. But I just misunderstood that flag, so nevermind 😅

Going to close this. Have a nice weekend 👋

@ansgarm ansgarm closed this as completed May 21, 2021
@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

ansgarm added a commit to ansgarm/jsii-srcmak that referenced this issue May 21, 2021
The `go.mod` is an expected artifact from `jsii-pakmak` (aws/jsii#2848 (comment)).
So this is not awaiting an upstream change.
mergify bot pushed a commit to cdklabs/jsii-srcmak that referenced this issue May 23, 2021
The `go.mod` is an expected artifact from `jsii-pakmak` (aws/jsii#2848 (comment)).
So this is not awaiting an upstream change.

References:
* aws/jsii#2848
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants