aws / aws-toolkit-jetbrains

AWS Toolkit for JetBrains - a plugin for interacting with AWS from JetBrains IDEs
https://plugins.jetbrains.com/plugin/11349-aws-toolkit
Apache License 2.0
747 stars 214 forks source link

Go Support #649

Closed ctompkinson closed 3 years ago

ctompkinson commented 5 years ago

We're starting to use SAM and it would be useful to have a plugin like this to make development easier but we use primarily Golang for lambdas.

Would it be easy/possible to add support for Goland?

abrooksv commented 5 years ago

We actually did prototype it. We will most likely wait for SAM build to add Go support, please request the feature for Go here: https://github.com/awslabs/aws-lambda-builders

msummers commented 5 years ago

It looks like aws-lambda-builders supports both dep and modules at this point- any update?

abrooksv commented 5 years ago

If I understand go's debugging requirements correctly, it has to be compiled with certain flags to make the build debuggable.

aws-lambda-builders currently does not support "debug" artifacts. https://github.com/awslabs/aws-sam-cli/pull/1095 is a design doc for debug builds, but concentrates on .NET first.

abrooksv commented 5 years ago

More info: https://github.com/go-delve/delve/blob/cba328f83404a02bc7a71842590a5c9a434f6015/cmd/dlv/cmds/commands.go#L645

msummers commented 5 years ago

Thanks for the update

rpoitras commented 5 years ago

As @abrooksv points out, Go debugging with 1.10 and up works best with these debug flags, -gcflags="all=-N -l". Debugging with no flags works, but not all data on the stack is available.

I would love to see GoLand support AWS toolkit.

jackmcguire1 commented 5 years ago

bump

jbeisser commented 5 years ago

This seems like a no brainer. aws-sam-cli supports it with sam init -r go, and creates a starting template. From there, it has existing template.yaml ready to go. Just being able to define the runtime as go1.x or go would be a great start.

wberrycdoor commented 4 years ago

+1

GeorgeGkinis commented 4 years ago

Any update on this?

AmudaPalani commented 4 years ago

+1

isereb commented 4 years ago

pleeeeease

jackmcguire1 commented 4 years ago

AWS SAM now supports go build for modules

So what are we waiting for ;)

AWS SAM v0.41.0

serverhorror commented 4 years ago

Is there anything that keeps this from working in Goland?

abrooksv commented 4 years ago

Is there anything that keeps this from working in Goland?

Depends on what features you want. The S3 browser would work, but the Lambda debugging feature would not since the internal Lambda extension points have not been implemented for Go.

serverhorror commented 4 years ago

Browsing and "deploy this function" would be good enough to get started.

I'm not sure whether that's possible from your end but I'd rather have a few of the features than nothing at all. Since this "half-baked install" (sorry, I lack proper words) is quite possible in IntelliJ people are most likely already using this. It's just that Goland is excluded. I know nothing about JetBrains plugin development but I'd guess it's just some sort of descriptor that says whether this plugin is supposed to work.

Do you think it is possible to let Goland get this via normal plugin mechanisms soon-ish? I'd rather not have to wait another year because of external dependencies and enjoy better integration with the overall toolchain. Debugging, it seems, is not possible whether I have the plugin available to me or not (I hope I'm understanding this correctly).

abrooksv commented 4 years ago

@serverhorror What are you referring to when you say "half-baked install"?

serverhorror commented 4 years ago

Sorry that was bad wording on my side. I'm not a native speaker and that wasn't meant to come over negative!

(Let me try again ;) ) I think you can totally release this for GoLand. aws-sam-cli -- and the rest of the ecosystem -- support what it supports. I'm very much fine with that and would like to enjoy all the shortcuts the IDEs (like PyCharm) give me. Especially right clicking on on template.yaml and quickly being able to deploy or redeploy. Pretty please? (insert cute/funny/nice animated GIV here to make you release it)

Sorry again, my fingers were way faster than my brain. I promise to try and do better -- I live the toolkit in JetBrains and will definitely pay you a beverage of your choice if you ever come to Vienna. (Sorry can't offer any other sorts of bribes)

abrooksv commented 4 years ago

Sorry that was bad wording on my side. I'm not a native speaker and that wasn't meant to come over negative!

(Let me try again ;) ) I think you can totally release this for GoLand. aws-sam-cli -- and the rest of the ecosystem -- support what it supports. I'm very much fine with that and would like to enjoy all the shortcuts the IDEs (like PyCharm) give me. Especially right clicking on on template.yaml and quickly being able to deploy or redeploy. Pretty please? (insert cute/funny/nice animated GIV here to make you release it)

Sorry again, my fingers were way faster than my brain. I promise to try and do better -- I live the toolkit in JetBrains and will definitely pay you a beverage of your choice if you ever come to Vienna. (Sorry can't offer any other sorts of bribes)

No offense taken, was just asking for clarification.

sliedig commented 4 years ago

+1 to supporting Goland IDE

abrooksv commented 4 years ago

We have enabled listing of the plugin in Goland.

To be clear, there are no Go specific features, but the features like S3 browser and CloudWatch logs are available.

jbeisser commented 4 years ago

@abrooksv, is there full Go support in the roadmap for the AWS Toolkit?

sidpat commented 3 years ago

Any update on running/debugging golang lambda locally in goland?

mousedownmike commented 3 years ago

I have the AWS Toolkit installed in GoLand and it looks like it is getting closer to full support of Go. Is this the best issue to follow for tracking progress? I'm specifically hoping to be able to run my SAM Lambdas and API Gateways with IDEA Run Configs.

The "play" gutter icons appear in the SAM templates and they bring up the (pretty slick looking) run dialog. Unfortunately it shows "Error: The runtime 'go1.x' is unsupported.' in the bottom of the dialog.

justinmk3 commented 3 years ago

Is this the best issue to follow for tracking progress?

Yes. And we'll update this issue if/when we break out more granular steps.

Thanks for the feedback!

abrooksv commented 3 years ago

The "play" gutter icons appear in the SAM templates and they bring up the (pretty slick looking) run dialog. Unfortunately it shows "Error: The runtime 'go1.x' is unsupported.' in the bottom of the dialog.

Hmmm, well that's a bad experience, we should show the gutter icon based on the presence of the aws.toolkit.lambda.builder extension point for that runtime so we don't give the false impression it is supported.

abrooksv commented 3 years ago

Work started in https://github.com/aws/aws-toolkit-jetbrains/tree/feature/go

2277

2280

2284

abrooksv commented 3 years ago

Our first release with Go support has reached our EAP channel. If anyone wants to give it a test drive and let us know of any issues, the link to download it for 2020.3 is https://plugins.jetbrains.com/plugin/11349-aws-toolkit/versions/EAP/115843