text:
x/tools/gopls: too slow on large package

What version of Go are you using (go version)?

$ go version
go version go1.12.7 darwin/amd64

Does this issue reproduce with the latest release?
Yes, it does.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOARCH="amd64"
GOBIN="/Users/svanharmelen/GoCode/bin"
GOCACHE="/Users/svanharmelen/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/svanharmelen/GoCode"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.7/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.7/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/bz/cgd8_ttn1tx_6f8mt_ys06qjgxjxn1/T/go-build916468534=/tmp/go-build -gno-record-gcc-switches -f
no-common"

What did you do?

$ git clone https://github.com/terraform-providers/terraform-provider-aws
$ cd terraform-provider-aws
$ gopls -rpc.trace -v check aws/resource_aws_rds_cluster.go

What did you expect to see?
A successful check without errors. What let me to start debugging is actually that completion started to take very long (several seconds). I assume this will at least be part of the reason, but regardless these errors are unexpected.
What did you see instead?

➜  workspace git clone https://github.com/terraform-providers/terraform-provider-aws
Cloning into 'terraform-provider-aws'...
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 103996 (delta 3), reused 8 (delta 2), pack-reused 103986
Receiving objects: 100% (103996/103996), 90.54 MiB | 22.82 MiB/s, done.
Resolving deltas: 100% (67391/67391), done.
Checking out files: 100% (6432/6432), done.
➜  workspace cd terraform-provider-aws
➜  terraform-provider-aws git:(master) gopls -rpc.trace -v check aws/resource_aws_rds_cluster.go
2019/08/07 22:13:22 Info:Build info
----------
golang.org/x/tools/gopls v0.1.2
    golang.org/x/tools/gopls@v0.1.3 h1:CB5ECiPysqZrwxcyRjN+exyZpY0gODTZvNiqQi3lpeo=
    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
    golang.org/x/tools@v0.0.0-20190710153321-831012c29e42 h1:4IOeC7p+OItq3+O5BWkcmVu2uBe3jekXau5S4QZX9DU=

Go info
-------
go version go1.12.7 darwin/amd64

GOARCH="amd64"
GOBIN="/Users/svanharmelen/GoCode/bin"
GOCACHE="/Users/svanharmelen/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/svanharmelen/GoCode"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.7/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.7/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/svanharmelen/workspace/terraform-provider-aws/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/bz/cgd8_ttn1tx_6f8mt_ys06qjgxjxn1/T/go-build545681017=/tmp/go-build -gno-record-gcc-switches -f
no-common"
2019/08/07 22:13:35 Error:unable to check package for file:///Users/svanharmelen/workspace/terraform-provider-aws/aws/resource_aws_rds_cluster.go: failed to cache file file:///Users/svanharmelen/workspace/terraform-provider-aws/aws/datasync.go: no AST for file:///Users/svanharmelen/workspace/terraform-provider-aws/aws/datasync.go
2019/08/07 22:13:38 Error:unable to check package for file:///Users/svanharmelen/workspace/terraform-provider-aws/aws/resource_aws_rds_cluster.go: failed to cache file file:///Users/svanharmelen/workspace/terraform-provider-aws/aws/datasync.go: no AST for file:///Users/svanharmelen/workspace/terraform-provider-aws/aws/datasync.go
/Users/svanharmelen/workspace/terraform-provider-aws/aws/resource_aws_rds_cluster.go: file:///Users/svanharmelen/workspace/terraform-provider-aws/aws/resource_aws_rds_cluster.go is not part of a package

Some additional info... When compiling the latest (master) locally I see a whole list of work queue is full messages and then a crash:
work queue is full
<snip>
work queue is full
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x1254c88]

goroutine 15 [running]:
go/types.(*Checker).handleBailout(0xc014246f00, 0xc0003ab5e8)
        /usr/local/Cellar/go/1.12.7/libexec/src/go/types/check.go:240 +0x98
panic(0x1611c40, 0x1c00020)
        /usr/local/Cellar/go/1.12.7/libexec/src/runtime/panic.go:522 +0x1b5
go/types.(*Checker).initFiles(0xc014246f00, 0xc0001a5800, 0x2ff, 0x2ff)
        /usr/local/Cellar/go/1.12.7/libexec/src/go/types/check.go:211 +0xd8
go/types.(*Checker).checkFiles(0xc014246f00, 0xc0001a5800, 0x2ff, 0x2ff, 0x0, 0x0)
        /usr/local/Cellar/go/1.12.7/libexec/src/go/types/check.go:250 +0x89
go/types.(*Checker).Files(...)
        /usr/local/Cellar/go/1.12.7/libexec/src/go/types/check.go:245
golang.org/x/tools/internal/lsp/cache.(*importer).typeCheck(0xc000c520c0, 0x17c63c0, 0xc0002d1590, 0xc0006bd600, 0x39, 0x0, 0x0, 0x0)
        /Users/svanharmelen/workspace/tools/internal/lsp/cache/check.go:200 +0xbf5
golang.org/x/tools/internal/lsp/cache.(*importer).getPkg(0xc000c520c0, 0x17c63c0, 0xc0002d1590, 0xc0006bd600, 0x39, 0xc000454f00, 0x2c, 0x0)
        /Users/svanharmelen/workspace/tools/internal/lsp/cache/check.go:72 +0x348
golang.org/x/tools/internal/lsp/cache.(*view).loadParseTypecheck(0xc000242000, 0x17c63c0, 0xc0002d1590, 0xc0002e0090, 0x0, 0x0, 0x0, 0x0, 0x0)
        /Users/svanharmelen/workspace/tools/internal/lsp/cache/load.go:54 +0x236
golang.org/x/tools/internal/lsp/cache.(*goFile).GetPackages(0xc0002e0090, 0x17c63c0, 0xc0002d1560, 0x0, 0x0, 0x0)
        /Users/svanharmelen/workspace/tools/internal/lsp/cache/gofile.go:100 +0x3c2
golang.org/x/tools/internal/lsp/cache.(*goFile).GetPackage(0xc0002e0090, 0x17c63c0, 0xc0002d1560, 0x12, 0xc0002de620)
        /Users/svanharmelen/workspace/tools/internal/lsp/cache/gofile.go:122 +0x4c
golang.org/x/tools/internal/lsp/source.Diagnostics(0x17c63c0, 0xc0002d1560, 0x17d0a60, 0xc000242000, 0x17ce700, 0xc0002e0090, 0x0, 0x0, 0x0, 0x0)
        /Users/svanharmelen/workspace/tools/internal/lsp/source/diagnostics.go:67 +0x1b4
golang.org/x/tools/internal/lsp.(*Server).Diagnostics(0xc00023c000, 0x17c63c0, 0xc0002d14d0, 0x17d0a60, 0xc000242000, 0xc00010e300, 0x7b)
        /Users/svanharmelen/workspace/tools/internal/lsp/diagnostics.go:30 +0x2c8
golang.org/x/tools/internal/lsp.(*Server).didOpen.func1(0x17d0a60, 0xc000242000, 0xc00023c000, 0xc00010e300, 0x7b)
        /Users/svanharmelen/workspace/tools/internal/lsp/text_synchronization.go:47 +0xf4
created by golang.org/x/tools/internal/lsp.(*Server).didOpen
        /Users/svanharmelen/workspace/tools/internal/lsp/text_synchronization.go:43 +0x24f

The panic was easy enough to fix, I'll open a PR for that.
Now that the panic is gone, I only see a bunch of work queue is full messages and then in the end a few of too many open files errors which is probably indicating what is causing the issue.

Just opened a PR for the panic part of this report: https://go-review.googlesource.com/c/tools/+/189397

Thanks for reporting this issue and fixing the nil pointer error. I'll investigate this as soon as I get a chance.

When I open this directory in VSCode, it seems like it works, but it is just very slow. The output I see for the check command is:
gopls -rpc.trace -v check ./aws/resource_aws_rds_cluster.go
2019/08/08 10:39:12 Info:89.997394ms for GOROOT= GOPATH=$HOME/code GO111MODULE=on PWD=$HOME/code/src/terraform-provider-aws go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "builtin", stderr: <<>>
2019/08/08 10:39:12 Info:147.151488ms for GOROOT= GOPATH=$HOME/code GO111MODULE=on PWD=$HOME/code/src/terraform-provider-aws go "list" "-m" "-json" "all", stderr: <<>>
2019/08/08 10:39:12 Info:Build info
----------
golang.org/x/tools/cmd/gopls v0.1.3-cmd.gopls
    golang.org/x/tools@(devel)
    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
    golang.org/x/xerrors@v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
Go info
go version go1.12.5 linux/amd64
GOARCH="amd64"
GOBIN="$HOME/code/bin"
GOCACHE="$HOME/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="$HOME/code"
GOPROXY="https://proxy.golang.org"
GORACE=""
GOROOT=
GOTMPDIR=""
GOTOOLDIR="$GOROOT/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="$HOME/code/src/terraform-provider-aws/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build180633135=/tmp/go-build -gno-record-gcc-switches"
2019/08/08 10:39:13 Info:147.654713ms for GOROOT= GOPATH=$HOME/code GO111MODULE=on PWD=$HOME/code/src/terraform-provider-aws go "list" "-m" "-json" "all", stderr: <<>>
2019/08/08 10:39:14 Info:1.137966922s for GOROOT= GOPATH=$HOME/code GO111MODULE=on PWD=$HOME/code/src/terraform-provider-aws go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "$HOME/code/src/terraform-provider-aws/aws", stderr: <<go: downloading github.com/terraform-providers/terraform-provider-template v2.1.2+incompatible
go: downloading github.com/terraform-providers/terraform-provider-tls v2.0.1+incompatible

2019/08/08 10:39:14 Info:go/packages.Load
packages = 1
2019/08/08 10:39:14 Info:go/packages.Load
package = github.com/terraform-providers/terraform-provider-aws/aws
files = [$HOME/code/src/terraform-provider-aws/aws/autoscaling_tags.go $HOME/code/src/terraform-provider-aws/aws/awserr.go $HOME/code/src/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go $HOME/code/src/terraform-provider-aws/aws/config.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_acm_certificate.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_acmpca_certificate_authority.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ami.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ami_ids.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_api_gateway_api_key.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_api_gateway_resource.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_api_gateway_rest_api.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_api_gateway_vpc_link.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_arn.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_autoscaling_group.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_availability_zone.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_availability_zones.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_batch_compute_environment.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_batch_job_queue.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_billing_service_account.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_caller_identity.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_canonical_user_id.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_cloudformation_export.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_cloudformation_stack.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_cloudhsm2_cluster.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_cloudwatch_log_group.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_codecommit_repository.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_cognito_user_pools.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_common_schema.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_cur_report_definition.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_customer_gateway.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_db_cluster_snapshot.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_db_event_categories.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_db_instance.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_db_snapshot.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_dx_gateway.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_dynamodb_table.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ebs_default_kms_key.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ebs_encryption_by_default.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ebs_volume.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_dx_gateway_attachment.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_route_table.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_vpc_attachment.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ec2_transit_gateway_vpn_attachment.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ecr_image.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ecr_repository.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ecs_cluster.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ecs_container_definition.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ecs_service.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ecs_task_definition.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_efs_file_system.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_efs_mount_target.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_eip.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_eks_cluster.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_eks_cluster_auth.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_application.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_hosted_zone.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_solution_stack.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_elasticache_cluster.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_elasticache_replication_group.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_elb.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_elb_hosted_zone_id.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_elb_service_account.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_glue_script.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_iam_account_alias.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_iam_group.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_iam_instance_profile.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_iam_policy.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_iam_policy_document.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_iam_role.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_iam_user.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_inspector_rules_packages.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_instance.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_instances.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_internet_gateway.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_iot_endpoint.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ip_ranges.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_kinesis_stream.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_kms_alias.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_kms_ciphertext.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_kms_key.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_kms_secret.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_kms_secrets.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_lambda_function.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_lambda_invocation.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_lambda_layer_version.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_launch_configuration.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_launch_template.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_lb.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_lb_listener.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_lb_target_group.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_mq_broker.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_msk_cluster.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_msk_configuration.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_nat_gateway.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_network_acls.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_network_interface.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_network_interfaces.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_organizations_organization.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_partition.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_prefix_list.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_pricing_product.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ram_resource_share.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_rds_cluster.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_redshift_cluster.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_redshift_service_account.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_region.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_route.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_route53_delegation_set.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_route53_zone.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_route_table.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_route_tables.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_s3_bucket.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_s3_bucket_object.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_s3_bucket_objects.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret_version.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_security_group.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_security_groups.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_servicequotas_service.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_servicequotas_service_quota.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_sns.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_sqs_queue.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ssm_document.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_storagegateway_local_disk.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_subnet.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_subnet_ids.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_transfer_server.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_vpc.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_vpc_dhcp_options.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_vpc_endpoint.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_vpc_endpoint_service.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_vpc_peering_connection.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_vpcs.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_vpn_gateway.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_waf_ipset.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_waf_rule.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_waf_web_acl.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_wafregional_ipset.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_wafregional_rule.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_wafregional_web_acl.go $HOME/code/src/terraform-provider-aws/aws/data_source_aws_workspaces_bundle.go $HOME/code/src/terraform-provider-aws/aws/datasync.go $HOME/code/src/terraform-provider-aws/aws/datasync_tags.go $HOME/code/src/terraform-provider-aws/aws/diff_suppress_funcs.go $HOME/code/src/terraform-provider-aws/aws/dx_vif.go $HOME/code/src/terraform-provider-aws/aws/ec2_filters.go $HOME/code/src/terraform-provider-aws/aws/ec2_transit_gateway.go $HOME/code/src/terraform-provider-aws/aws/ecs_task_definition_equivalency.go $HOME/code/src/terraform-provider-aws/aws/hosted_zones.go $HOME/code/src/terraform-provider-aws/aws/iam_policy_model.go $HOME/code/src/terraform-provider-aws/aws/import_aws_cloudfront_distribution.go $HOME/code/src/terraform-provider-aws/aws/import_aws_db_event_subscription.go $HOME/code/src/terraform-provider-aws/aws/import_aws_network_acl.go $HOME/code/src/terraform-provider-aws/aws/import_aws_s3_bucket.go $HOME/code/src/terraform-provider-aws/aws/import_aws_security_group.go $HOME/code/src/terraform-provider-aws/aws/network_acl_entry.go $HOME/code/src/terraform-provider-aws/aws/opsworks_layers.go $HOME/code/src/terraform-provider-aws/aws/provider.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_acm_certificate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_acm_certificate_validation.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ami.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ami_copy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ami_from_instance.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ami_launch_permission.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_account.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_api_key.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_authorizer.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_base_path_mapping.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_client_certificate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_deployment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_documentation_part.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_documentation_version.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_domain_name.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_gateway_response.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_integration.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_integration_response.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_method.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_method_response.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_method_settings.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_model.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_request_validator.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_resource.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan_key.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_app_cookie_stickiness_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_appautoscaling_scheduled_action.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_appautoscaling_target.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_appmesh_mesh.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_appmesh_route.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_appmesh_virtual_node.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_appmesh_virtual_node_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_appmesh_virtual_router.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_appmesh_virtual_router_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_appmesh_virtual_service.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_appsync_api_key.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_appsync_datasource.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_appsync_function.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_appsync_graphql_api.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_appsync_resolver.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_athena_database.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_athena_named_query.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_athena_workgroup.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_autoscaling_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_autoscaling_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_autoscaling_group_waiting.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_autoscaling_lifecycle_hook.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_autoscaling_notification.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_autoscaling_schedule.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_backup_plan.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_backup_selection.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_backup_vault.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_batch_compute_environment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_batch_job_definition.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_batch_job_queue.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_budgets_budget.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloud9_environment_ec2.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudformation_stack.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudformation_stack_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudformation_stack_set_instance.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudfront_distribution_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudfront_origin_access_identity.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudfront_public_key.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudhsm2_cluster.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudhsm2_hsm.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudtrail.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudwatch_dashboard.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudwatch_event_permission.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudwatch_log_resource_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudwatch_log_stream.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudwatch_log_subscription_filter.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_codebuild_project.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_codebuild_source_credential.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_codebuild_webhook.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_codecommit_repository.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_codecommit_trigger.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_codedeploy_app.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_codepipeline.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_codepipeline_webhook.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cognito_identity_pool_roles_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cognito_identity_provider.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cognito_resource_server.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cognito_user_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cognito_user_pool.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cognito_user_pool_domain.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_config_aggregate_authorization.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_config_config_rule.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_config_configuration_aggregator.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_config_configuration_recorder.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_config_configuration_recorder_status.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_config_delivery_channel.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_cur_report_definition.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_customer_gateway.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_datapipeline_pipeline.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_datasync_agent.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_datasync_location_efs.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_datasync_location_nfs.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_datasync_location_s3.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_datasync_task.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dax_cluster.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dax_parameter_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dax_subnet_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_db_cluster_snapshot.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_db_event_subscription.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_db_instance.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_db_instance_role_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_db_option_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_db_parameter_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_db_security_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_db_snapshot.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_db_subnet_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_default_network_acl.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_default_route_table.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_default_security_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_default_subnet.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_default_vpc.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_default_vpc_dhcp_options.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_devicefarm_project.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_directory_service_conditional_forwarder.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_directory_service_directory.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_directory_service_log_subscription.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dlm_lifecycle_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dms_certificate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dms_endpoint.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dms_replication_instance.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dms_replication_subnet_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dms_replication_task.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_docdb_cluster.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_docdb_cluster_instance.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_docdb_cluster_parameter_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_docdb_cluster_snapshot.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_docdb_subnet_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dx_bgp_peer.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dx_connection.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dx_connection_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dx_gateway.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dx_gateway_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dx_gateway_association_proposal.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dx_lag.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dx_transit_virtual_interface.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dynamodb_global_table.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dynamodb_table.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dynamodb_table_item.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_dynamodb_table_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ebs_default_kms_key.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ebs_encryption_by_default.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ebs_snapshot.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ebs_snapshot_copy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ebs_volume.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ec2_capacity_reservation.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_endpoint.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_network_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ec2_fleet.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route_table_propagation.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_vpc_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_vpc_attachment_accepter.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ecr_repository.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ecr_repository_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ecs_cluster.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ecs_service.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ecs_task_definition_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_efs_file_system.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_efs_mount_target.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_egress_only_internet_gateway.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_eip.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_eip_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_eks_cluster.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application_version.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_configuration_template.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elastic_transcoder_pipeline.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elastic_transcoder_preset.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elasticache_security_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elasticache_subnet_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elb.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_elb_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_emr_cluster.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_emr_instance_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_emr_security_configuration.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_flow_log.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_fms_admin_account.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_gamelift_alias.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_gamelift_build.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_gamelift_game_session_queue.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_glacier_vault.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_glacier_vault_lock.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_globalaccelerator_accelerator.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_globalaccelerator_endpoint_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_globalaccelerator_listener.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_glue_catalog_database.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_glue_catalog_table.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_glue_classifier.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_glue_connection.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_glue_crawler.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_glue_job.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_glue_security_configuration.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_glue_trigger.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_guardduty_detector.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_guardduty_invite_accepter.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_guardduty_ipset.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_guardduty_member.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_guardduty_threatintelset.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_access_key.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_account_alias.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_account_password_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_group_membership.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_group_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_group_policy_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_openid_connect_provider.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_policy_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_role.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_role_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_role_policy_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_saml_provider.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_service_linked_role.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_user.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_user_login_profile.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_user_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_user_policy_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iam_user_ssh_key.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_inspector_assessment_target.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_inspector_assessment_template.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_inspector_resource_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_instance.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_instance_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_internet_gateway.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iot_certificate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iot_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iot_policy_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iot_role_alias.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iot_thing.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iot_thing_principal_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iot_thing_type.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_iot_topic_rule.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_key_pair.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_key_pair_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_kinesis_analytics_application.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_kinesis_stream.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_kinesis_stream_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_kms_alias.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_kms_ciphertext.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_kms_external_key.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_kms_grant.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_kms_key.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lambda_alias.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lambda_event_source_mapping.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lambda_function.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lambda_layer_version.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lambda_permission.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_launch_configuration.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_launch_template.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lb.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lb_cookie_stickiness_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lb_listener.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lb_listener_certificate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lb_ssl_negotiation_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lb_target_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lb_target_group_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_licensemanager_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_licensemanager_license_configuration.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lightsail_domain.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lightsail_instance.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lightsail_key_pair.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lightsail_static_ip.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_lightsail_static_ip_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_load_balancer_backend_server_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_load_balancer_listener_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_load_balancer_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_macie_member_account_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_macie_s3_bucket_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_main_route_table_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_media_package_channel.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_media_store_container.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_media_store_container_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_mq_broker.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_mq_configuration.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_msk_cluster.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_msk_configuration.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_nat_gateway.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_neptune_cluster.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_neptune_cluster_instance.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_neptune_cluster_parameter_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_neptune_cluster_snapshot.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_neptune_event_subscription.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_neptune_parameter_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_neptune_subnet_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_network_acl.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_network_acl_rule.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_network_interface.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_network_interface_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_network_interface_sg_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_application.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_custom_layer.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_ganglia_layer.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_haproxy_layer.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_instance.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_java_app_layer.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_memcached_layer.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_mysql_layer.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_nodejs_app_layer.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_permission.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_php_app_layer.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_rails_app_layer.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_stack.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_static_web_layer.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_opsworks_user_profile.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_organizations_account.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_organizations_organization.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_organizations_organizational_unit.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_organizations_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_organizations_policy_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_pinpoint_adm_channel.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_pinpoint_apns_channel.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_pinpoint_apns_sandbox_channel.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_channel.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_sandbox_channel.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_pinpoint_app.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_pinpoint_baidu_channel.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_pinpoint_email_channel.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_pinpoint_event_stream.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_pinpoint_gcm_channel.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_pinpoint_sms_channel.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_placement_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_proxy_protocol_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_quicksight_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ram_principal_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ram_resource_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ram_resource_share.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_rds_cluster.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_rds_cluster_endpoint.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_rds_global_cluster.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_redshift_cluster.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_redshift_event_subscription.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_redshift_parameter_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_redshift_security_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_redshift_snapshot_copy_grant.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_redshift_snapshot_schedule.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_redshift_snapshot_schedule_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_redshift_subnet_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_resourcegroups_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_route.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_route53_delegation_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_route53_health_check.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_route53_query_log.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_route53_record.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_route53_record_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_route53_resolver_endpoint.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_route53_resolver_rule.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_route53_resolver_rule_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_route53_zone.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_route53_zone_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_route_table.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_route_table_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_s3_account_public_access_block.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_s3_bucket.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_s3_bucket_metric.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_s3_bucket_notification.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_s3_bucket_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_s3_bucket_public_access_block.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_sagemaker_endpoint.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_sagemaker_endpoint_configuration.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_sagemaker_model.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_sagemaker_notebook_instance.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_sagemaker_notebook_instance_lifecycle_configuration.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_secretsmanager_secret_version.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_security_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_security_group_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_security_group_rule.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_security_group_rule_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_securityhub_account.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_securityhub_product_subscription.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_securityhub_standards_subscription.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_service_discovery_http_namespace.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_service_discovery_private_dns_namespace.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_service_discovery_public_dns_namespace.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_service_discovery_service.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_servicecatalog_portfolio.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_servicequotas_service_quota.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ses_active_receipt_rule_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ses_configuration_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ses_domain_dkim.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ses_domain_identity.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ses_domain_identity_verification.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ses_domain_mail_from.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ses_email_identity.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ses_event_destination.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ses_identity_notification_topic.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ses_identity_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ses_receipt_filter.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ses_receipt_rule_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ses_template.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_sfn_activity.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_sfn_state_machine.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_shield_protection.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_simpledb_domain.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_snapshot_create_volume_permission.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_sns_platform_application.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_sns_sms_preferences.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_sns_topic.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_sns_topic_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_sns_topic_subscription.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_spot_datafeed_subscription.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_spot_fleet_request_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_spot_instance_request.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_sqs_queue.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_sqs_queue_policy.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_sqs_queue_policy_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ssm_activation.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ssm_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ssm_association_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ssm_document.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_target.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ssm_parameter.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ssm_patch_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_ssm_resource_data_sync.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_storagegateway_cache.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_storagegateway_cached_iscsi_volume.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_storagegateway_gateway.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_storagegateway_nfs_file_share.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_storagegateway_smb_file_share.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_storagegateway_upload_buffer.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_storagegateway_working_storage.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_subnet.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_subnet_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_swf_domain.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_transfer_server.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_transfer_ssh_key.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_transfer_user.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_volume_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpc.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpc_endpoint_connection_notification.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpc_endpoint_route_table_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpc_endpoint_service.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpc_endpoint_service_allowed_principal.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpc_endpoint_subnet_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpc_ipv4_cidr_block_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpc_migrate.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_accepter.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_options.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpn_connection.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpn_gateway.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpn_gateway_attachment.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_vpn_gateway_route_propagation.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_waf_byte_match_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_waf_geo_match_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_waf_ipset.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_waf_rate_based_rule.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_waf_regex_match_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_waf_regex_pattern_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_waf_rule.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_waf_rule_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_waf_size_constraint_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_waf_sql_injection_match_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_waf_web_acl.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_waf_xss_match_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_wafregional_byte_match_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_wafregional_geo_match_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_wafregional_ipset.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_wafregional_rate_based_rule.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_wafregional_regex_match_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_wafregional_regex_pattern_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_wafregional_rule.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_wafregional_rule_group.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_wafregional_size_constraint_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_wafregional_sql_injection_match_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_wafregional_web_acl.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_wafregional_web_acl_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_wafregional_xss_match_set.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_worklink_fleet.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_worklink_website_certificate_authority_association.go $HOME/code/src/terraform-provider-aws/aws/resource_aws_xray_sampling_rule.go $HOME/code/src/terraform-provider-aws/aws/s3_tags.go $HOME/code/src/terraform-provider-aws/aws/structure.go $HOME/code/src/terraform-provider-aws/aws/tags.go $HOME/code/src/terraform-provider-aws/aws/tagsACM.go $HOME/code/src/terraform-provider-aws/aws/tagsACMPCA.go $HOME/code/src/terraform-provider-aws/aws/tagsAppmesh.go $HOME/code/src/terraform-provider-aws/aws/tagsAppsync.go $HOME/code/src/terraform-provider-aws/aws/tagsAthena.go $HOME/code/src/terraform-provider-aws/aws/tagsBeanstalk.go $HOME/code/src/terraform-provider-aws/aws/tagsCloudFront.go $HOME/code/src/terraform-provider-aws/aws/tagsCloudWatch.go $HOME/code/src/terraform-provider-aws/aws/tagsCloudWatchEvent.go $HOME/code/src/terraform-provider-aws/aws/tagsCloudtrail.go $HOME/code/src/terraform-provider-aws/aws/tagsCodeBuild.go $HOME/code/src/terraform-provider-aws/aws/tagsCodeCommit.go $HOME/code/src/terraform-provider-aws/aws/tagsCodePipeline.go $HOME/code/src/terraform-provider-aws/aws/tagsCognito.go $HOME/code/src/terraform-provider-aws/aws/tagsConfigService.go $HOME/code/src/terraform-provider-aws/aws/tagsDAX.go $HOME/code/src/terraform-provider-aws/aws/tagsDS.go $HOME/code/src/terraform-provider-aws/aws/tagsDX.go $HOME/code/src/terraform-provider-aws/aws/tagsDataPipeline.go $HOME/code/src/terraform-provider-aws/aws/tagsDocDB.go $HOME/code/src/terraform-provider-aws/aws/tagsDynamoDb.go $HOME/code/src/terraform-provider-aws/aws/tagsEC.go $HOME/code/src/terraform-provider-aws/aws/tagsECR.go $HOME/code/src/terraform-provider-aws/aws/tagsECS.go $HOME/code/src/terraform-provider-aws/aws/tagsEFS.go $HOME/code/src/terraform-provider-aws/aws/tagsELB.go $HOME/code/src/terraform-provider-aws/aws/tagsGeneric.go $HOME/code/src/terraform-provider-aws/aws/tagsIAM.go $HOME/code/src/terraform-provider-aws/aws/tagsInspector.go $HOME/code/src/terraform-provider-aws/aws/tagsKMS.go $HOME/code/src/terraform-provider-aws/aws/tagsKinesisAnalytics.go $HOME/code/src/terraform-provider-aws/aws/tagsKinesisFirehose.go $HOME/code/src/terraform-provider-aws/aws/tagsLambda.go $HOME/code/src/terraform-provider-aws/aws/tagsLicenseManager.go $HOME/code/src/terraform-provider-aws/aws/tagsLightsail.go $HOME/code/src/terraform-provider-aws/aws/tagsMQ.go $HOME/code/src/terraform-provider-aws/aws/tagsMediaStore.go $HOME/code/src/terraform-provider-aws/aws/tagsMediapackage.go $HOME/code/src/terraform-provider-aws/aws/tagsNeptune.go $HOME/code/src/terraform-provider-aws/aws/tagsOpsworks.go $HOME/code/src/terraform-provider-aws/aws/tagsOrganizations.go $HOME/code/src/terraform-provider-aws/aws/tagsPinPointApp.go $HOME/code/src/terraform-provider-aws/aws/tagsRAM.go $HOME/code/src/terraform-provider-aws/aws/tagsRDS.go $HOME/code/src/terraform-provider-aws/aws/tagsRedshift.go $HOME/code/src/terraform-provider-aws/aws/tagsRoute53Resolver.go $HOME/code/src/terraform-provider-aws/aws/tagsSNS.go $HOME/code/src/terraform-provider-aws/aws/tagsSSM.go $HOME/code/src/terraform-provider-aws/aws/tagsSecretsManager.go $HOME/code/src/terraform-provider-aws/aws/tagsSfn.go $HOME/code/src/terraform-provider-aws/aws/tagsTransfer.go $HOME/code/src/terraform-provider-aws/aws/tags_apigateway.go $HOME/code/src/terraform-provider-aws/aws/tags_dms.go $HOME/code/src/terraform-provider-aws/aws/tags_elasticsearchservice.go $HOME/code/src/terraform-provider-aws/aws/tags_kinesis.go $HOME/code/src/terraform-provider-aws/aws/tags_msk.go $HOME/code/src/terraform-provider-aws/aws/tags_route53.go $HOME/code/src/terraform-provider-aws/aws/tags_sagemaker.go $HOME/code/src/terraform-provider-aws/aws/utils.go $HOME/code/src/terraform-provider-aws/aws/validators.go $HOME/code/src/terraform-provider-aws/aws/waf_helpers.go $HOME/code/src/terraform-provider-aws/aws/waf_token_handlers.go $HOME/code/src/terraform-provider-aws/aws/wafregionl_token_handlers.go]
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full
work queue is full

@svanharmelen: Are you seeing similar behavior?

@stamblerre almost, but I'm also getting some too many open files errors near the end. I see you are working on a Linux machine, which is probably why you don't see those errors (as Linux has a default open file limit of 1024 per process, while MacOS has a default limit of just 256 open files).
Example output
$gopls -rpc.trace -v check aws/resource_aws_rds_cluster.go
2019/08/08 09:07:19 Info:137.714259ms for GOROOT= GOPATH=/Users/svanharmelen/GoCode GO111MODULE=on PWD=/Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "builtin", stderr: <<>>
2019/08/08 09:07:19 Info:Build info
----------
golang.org/x/tools/gopls v0.1.3
    golang.org/x/tools/gopls@(devel)
    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
    golang.org/x/tools@v0.0.0-20190723021737-8bb11ff117ca => ../
    golang.org/x/xerrors@v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
Go info
go version go1.12.7 darwin/amd64
GOARCH="amd64"
GOBIN="/Users/svanharmelen/GoCode/bin"
GOCACHE="/Users/svanharmelen/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/svanharmelen/GoCode"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.7/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.7/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/bz/cgd8_ttn1tx_6f8mt_ys06qjgxjxn1/T/go-build260478980=/tmp/go-build -gno-record-gcc-switches -fno-common"
2019/08/08 09:07:19 Info:441.371261ms for GOROOT= GOPATH=/Users/svanharmelen/GoCode GO111MODULE=on PWD=/Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws go "list" "-m" "-json" "all", stderr: <<>>
2019/08/08 09:07:20 Info:242.257406ms for GOROOT= GOPATH=/Users/svanharmelen/GoCode GO111MODULE=on PWD=/Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws go "list" "-m" "-json" "all", stderr: <<>>
2019/08/08 09:07:21 Info:1.637872758s for GOROOT= GOPATH=/Users/svanharmelen/GoCode GO111MODULE=on PWD=/Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws", stderr: <<>>
2019/08/08 09:07:21 Info:go/packages.Load
packages = 2
2019/08/08 09:07:21 Info:go/packages.Load
package = github.com/terraform-providers/terraform-provider-aws/aws
files = []
2019/08/08 09:07:21 Info:go/packages.Load
package = github.com/terraform-providers/terraform-provider-aws/aws
files = []
work queue is full
work queue is full
work queue is full

...

work queue is full
work queue is full
work queue is full
2019/08/08 09:07:26 Error:unable to check package: failed to cache file file:///Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_waf_web_acl.go: no AST for file:///Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_waf_web_acl.go: open /Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_waf_web_acl.go: too many open files
file = file:///Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go
2019/08/08 09:07:26 Info:212.839587ms for GOROOT= GOPATH=/Users/svanharmelen/GoCode GO111MODULE=on PWD=/Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws go "list" "-m" "-json" "all", stderr: <<>>
2019/08/08 09:07:28 Info:1.669277024s for GOROOT= GOPATH=/Users/svanharmelen/GoCode GO111MODULE=on PWD=/Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws", stderr: <<>>
2019/08/08 09:07:28 Info:go/packages.Load
packages = 2
2019/08/08 09:07:28 Info:go/packages.Load
package = github.com/terraform-providers/terraform-provider-aws/aws
files = []
2019/08/08 09:07:28 Info:go/packages.Load
package = github.com/terraform-providers/terraform-provider-aws/aws
files = []
2019/08/08 09:07:29 Error:failed to deliver diagnostic (will retry): GetAST: unable to check package for file:///Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go: failed to cache file file:///Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_waf_web_acl.go: no AST for file:///Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_waf_web_acl.go: open /Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_waf_web_acl.go: too many open files
file = file:///Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go
2019/08/08 09:07:29 Info:206.393562ms for GOROOT= GOPATH=/Users/svanharmelen/GoCode GO111MODULE=on PWD=/Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws go "list" "-m" "-json" "all", stderr: <<>>
2019/08/08 09:07:31 Info:1.654146998s for GOROOT= GOPATH=/Users/svanharmelen/GoCode GO111MODULE=on PWD=/Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws", stderr: <<>>
2019/08/08 09:07:31 Info:go/packages.Load
packages = 2
2019/08/08 09:07:31 Info:go/packages.Load
package = github.com/terraform-providers/terraform-provider-aws/aws
files = []
2019/08/08 09:07:31 Info:go/packages.Load
package = github.com/terraform-providers/terraform-provider-aws/aws
files = []
2019/08/08 09:07:32 Error:failed to deliver diagnostic for (will not retry): GetAST: unable to check package for file:///Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go: failed to cache file file:///Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_waf_web_acl.go: no AST for file:///Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_waf_web_acl.go: open /Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_waf_web_acl.go: too many open files
file = file:///Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go
check: timed out waiting for results from file:///Users/svanharmelen/GoCode/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go

I think your staying below the 1024 limit because of the worker in the telemetry package having a limit of 1000.
The actual code that is causing the issue is here. If I update this loop so it uses a semaphore with a limit below 256, the problem goes away:
	sem := semaphore.NewWeighted(250)
	for i, ph := range pkg.files {
		wg.Add(1)
		go func(i int, ph source.ParseGoHandle) {
			sem.Acquire(ctx, 1)
			defer sem.Release(1)
			defer wg.Done()

			files[i], parseErrors[i] = ph.Parse(ctx)
		}(i, ph)
	}
	wg.Wait()

But I'm not sure if you think this is the correct place to fix this problem? And also I'm not sure if 250 is low enough as it's pretty close to 256 and I'm not sure what other file could possibly be open at this point in the code?

Of course the semaphore could also just be a simple sem := make(chan struct{}, 250) if you prefer. Works just as well and saves an import, but I thought it would be nice to "eat our own dog food" 😏

Limiting the number of open files to the correct OS-specific values does sound like a reasonable solution, though perhaps we could build tag the constants per-OS to avoid unnecessarily constraining Linux. If you'd like to contribute this fix, please feel free to send me a CL for it.

Though, I'm actually surprised that this fix works. The number of files being parsed simultaneously should be constrained here, with a maximum limit of 20.

Ah... I think I found it... It seems the "semaphore" is used, after the file is being read:
func parseGo(ctx context.Context, c *cache, fh source.FileHandle, mode source.ParseMode) (*ast.File, error) {
	ctx, done := trace.StartSpan(ctx, "cache.parseGo", telemetry.File.Of(fh.Identity().URI.Filename()))
	defer done()
	buf, _, err := fh.Read(ctx) <-- the file is being read here
	if err != nil {
		return nil, err
	}
	parseLimit <- struct{}{} <-- the "semaphore" is used here
	defer func() { <-parseLimit }()
	<snip>
}

So all the reads are done at (more or less) the same time. The telemetry worker has a throttling side effect, but with a limit too high for the MacOS limit.
Do you agree this is the root cause? If so this fix is pretty straight forward (just swapping the few lines), so I can make a PR for that.

Oh wow, thanks for catching that. I can't believe we missed it in review. Please do send a PR if you can!

Created a PR just now: https://go-review.googlesource.com/c/tools/+/189437

Now that the ioLimit CL has been submitted, the issues with too many open files on Macs should be resolved. However, the overall issue still persists - gopls is far too slow on a package with a large number of files.

Ah, thanks for updating the issue! I just asked about this on Slack as well (didn't saw you updated this already) :+1:

One issue here is almost certainly the LSP protocol forcing us to send a notification per file. More often than not, diagnostic updates will be package-oriented, and even then the availibility of diagnostics is more a function of the architecture of gopls (and the syntax, type and analysis checking approaches used).
For example, type checking in response to a change results in diagnostics for a package and its reverse dependencies. The results from type checking are not incremental. When type checking is complete, all diagnostics for all files are known at that point in time: having to send separate diagnostic notifications per file is just overhead.
This per-file approach also places overhead on the LSP client as well. In govim we are considering working around this by batching diagnostic updates from gopls using time windows
@stamblerre - any thoughts on this? Have you discussed a change/addition to the LSP spec on this point?

This isn't yet something that we've thought about, but it would definitely be something to consider requesting. @myitcv, does CL 208261 help with this?

@stamblerre yes CL 208261 will be a big help.
But still if, say, 50 files have diagnostics change as a result of a file change, then we will still get 50 separate diagnostic notifications. Far more efficient would be to deliver those diagnostics as part of a single notification. It's not critical for now though.

@stamblerre Regarding slow completions on big packages, is the plan to implement minimal type checking for completion so we only type check a function body if it contains the cursor?

Long-term, yes. I don't expect us to get to that for a while, however - it would be a pretty significant change.

I just tested this out again, and I'm finding that gopls is still intolerably slow on https://github.com/terraform-providers/terraform-provider-aws. This will require some further investigation, since diagnostics are now being cached.

Checking back in - gopls remains intolerably slow in this repository, but it does better than VS Code Go with default settings (which hung completely). While this still remains a concern, gopls is still a net improvement, so I will move this out of the v1.0 milestone.

I would say that it's OK to close this one. At least for me things work reasonably ATM...

Could we reopen this? It's still extremely slow and unusable with mentioned repository.

The issue is no longer happening on https://github.com/terraform-providers/terraform-provider-aws repository as it has been split into multiple smaller packages recently.

Thanks @kamilturek; just going through old performance bugs now that gopls@v0.12.0-pre.1 has been released (a major rewrite for memory usage and performance).
Closing this as resolved.

authors: findleyr kamilturek muirdm myitcv stamblerre svanharmelen


text:
panic: Non-SSAable value should be a named location: foo.rts

What version of Go are you using (go version)?

$ go version
go version devel +adef06c7a5 Mon Oct 28 12:35:06 2019 +0000 windows/amd64

Does this issue reproduce with the latest release?
No.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
set GO111MODULE=auto
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\mattn\AppData\Local\go-build
set GOENV=C:\Users\mattn\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\mattn\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\dev\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\dev\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\mattn\AppData\Local\Temp\go-build784877526=/tmp/go-build -gno-record-gcc-switches

What did you do?
main.go
package main

/*
#include <stdlib.h>

typedef struct Point {
    int x;
    int y;
} Point;

typedef struct Points {
    Point* points;
	int length;
} Points;

typedef struct Rect {
    Points rts;
} Rect;

struct Rect X() {
  struct Rect foo;
  return foo;
}

void Y(Points ps) {
}
*/
import "C"

func main() {
	foo := C.X()
	defer C.Y(foo.rts)
}

Compiling this code
What did you expect to see?
Success to compile
What did you see instead?
# command-line-arguments
panic: Non-SSAable value should be a named location: foo.rts

goroutine 21 [running]:
cmd/compile/internal/gc.(*state).openDeferSave(0xc0002d2480, 0xc000319f00, 0xc00044ae40, 0xc0004988c0, 0xc000498700)
	C:/dev/go/src/cmd/compile/internal/gc/ssa.go:4184 +0x7a1
cmd/compile/internal/gc.(*state).openDeferRecord(0xc0002d2480, 0xc000319e80)
	C:/dev/go/src/cmd/compile/internal/gc/ssa.go:4130 +0x237
cmd/compile/internal/gc.(*state).stmt(0xc0002d2480, 0xc000319f80)
	C:/dev/go/src/cmd/compile/internal/gc/ssa.go:1080 +0x16f8
cmd/compile/internal/gc.(*state).stmtList(0xc0002d2480, 0xc00031a7e0)
	C:/dev/go/src/cmd/compile/internal/gc/ssa.go:1018 +0x5f
cmd/compile/internal/gc.buildssa(0xc0002b8dc0, 0x0, 0x0)
	C:/dev/go/src/cmd/compile/internal/gc/ssa.go:426 +0xc40
cmd/compile/internal/gc.compileSSA(0xc0002b8dc0, 0x0)
	C:/dev/go/src/cmd/compile/internal/gc/pgen.go:298 +0x64
cmd/compile/internal/gc.compileFunctions.func2(0xc000091500, 0xc00034ccb0, 0x0)
	C:/dev/go/src/cmd/compile/internal/gc/pgen.go:363 +0x50
created by cmd/compile/internal/gc.compileFunctions
	C:/dev/go/src/cmd/compile/internal/gc/pgen.go:361 +0x12f

@danscales

source: gharchive/issue

repo: golang/go

license_type: permissive

license_source: github-api


text:
proposal: Go 2: add check err goto handler

I had an Epiphany last night like this:
func readAllText(path string) string {
	buffer, err := ioutil.ReadFile(path)

	if err != nil {
		goto handler
	}

	return string(buffer)

handler:
	{
		fmt.Println("error: ", err.Error())
		return ""
	}
}

Only the second value is detected each time, and if more than one value is returned, it is recommended to encapsulate it as a type,
If you provide a keyword to detect whether the second variable is nil like this:
a,err := method()
check err goto handler
b,err := method2()
if err != nil{
  // Special error handling...
}
handler:
	{
		fmt.Println("error: ", err.Error())
	}

This makes it compatible with previous or future error handling,Can you solve the problem of error handling
Finally , I'm sorry for my poor English

This seems a bit like "ON ERROR GOTO" in (Visual) Basic. (https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/on-error-statement). If we wanted this in Go, we could perhaps do something like this to stay backwards compatible:

func Foo() {
var err error

goto handler for err // will execute goto handler whenever err becomes non-nil, only error type is allowed.

err = mayFail1()
err = mayFail2()

handler: {
        // do something with err here
        }
}

While "ON ERROR GOTO" is a simple and familiar feature of programming languages, I am undecided whether it is a good feature or not. It overlaps with defer() in some possibly confusing ways.

This looks like it's ambiguous?

See also #32611 and #34140.

It sounds like you are suggesting that we replace
    if err != nil {
        goto handler
    }

with
    check err goto handler

That introduces a new keyword check.  In the statement it removes if, != nil, { and }, and a couple of newline characters.  That's only a saving of four characters and two newline characters.  That doesn't seem like a big enough benefit for a new keyword.
It also makes goto a normal and expected part of error handling.  That might be OK, but many people are careful about goto as it can lead to unstructured code.
We also have to consider code like
    f, err := os.Open("x")
    check err goto handler
    s := "str"
handler:
    return s

We don't permit a normal 'goto' to jump over a variable declaration like that, and we probably don't want check err goto to do that either.  But that limits the cases in which this technique will work.

For language change proposals, please fill out the template at https://go.googlesource.com/proposal/+/bd3ac287ccbebb2d12a386f1f1447876dd74b54d/go2-language-changes.md .
When you are done, please reply to the issue with @gopherbot please remove label WaitingForInfo.
Thanks!

Thank you for your reply, which made me realize that goto cannot solve the problem, tanks

@gopherbot  please remove label WaitingForInfo

Are you withdrawing the proposal?

authors: beoran ianlancetaylor noErrorNoLife


text:
net/http: Client.Do documentation is incorrect about *url.Error.Timeout

What version of Go are you using (go version)?

$ go version
go version go1.16.4 linux/amd64

Does this issue reproduce with the latest release?
Yes.
It also reproduces with go1.17 devel.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/home/manlio/.local/bin"
GOCACHE="/home/manlio/.cache/go-build"
GOENV="/home/manlio/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE="*.local"
GOMODCACHE="/home/manlio/.local/lib/go/pkg/mod"
GONOPROXY=""
GONOSUMDB="*.local"
GOOS="linux"
GOPATH="/home/manlio/.local/lib/go:/home/manlio/src/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16.4"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1653706074=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.16.4 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.16.4
uname -sr: Linux 5.12.5-arch1-1
/usr/lib/libc.so.6: GNU C Library (GNU libc) release release version 2.33.
gdb --version: GNU gdb (GDB) 10.2

What did you do?
https://play.golang.org/p/YQH5oWtQWjC
What did you expect to see?
timed out: true
As documented by https://golang.org/pkg/net/http/#Client.Do:
Any returned error will be of type *url.Error. The url.Error value's Timeout method will report true if request timed out or was canceled.

What did you see instead?
timed out: false

If this is just a documentation fix, this can land any time. I haven't read deeply into this, but maybe you're up for contributing the doc fix? :) See https://golang.org/doc/contribute.
CC @neild

Looking at the source code, the implementation does not check if Client.send returns context.Canceled.  So it is either the documentation incorrect or the implementation incorrect.
Also, I think that the TODO in https://go.googlesource.com/go/+/refs/heads/master/src/net/http/client.go#732 is wrong.  The send function seems  to returns err == context.Canceled and didTimeout() == false when the context is canceled.

I was going to say that we should drop the mention of the Timeout method in favor of errors.Is(err, context.DeadlineExceeded) or errors.Is(err, os.DeadlineExceeded), but those are apparently different errors and I'm not 100% certain that net/http consistently returns one or the other.
We should make sure that it's possible to test for timeouts with a single sentinel error and document that.

According to #33545, the problem is with the documentation.  https://golang.org/cl/200798 also locked-in the current behavior with a test.
The problem is that #33545 only fixed the documentation of the Client.Get method, forgetting(?) the Get function and Client.Do method.

authors: mknyszek neild perillo


text:
proposal: x/tools/go/ssa: add Postdominator to Function/BasicBlock

https://pkg.go.dev/golang.org/x/tools/go/ssa#Function  does not build or expose post-dominator relationships among its constituent basic basics.
I found it essential to find post dominance in SSA functions for a lock-unlock analysis [here (https://arxiv.org/pdf/2106.01710.pdf).
The code using the post dominance can be seen here.
Constructing and exposing post dominance in an SSA Function is relatively simple. It can reuse most of the code available for dominance. I have an example buildPostdomtree() here.
We need to add APIs such as:
func (b *BasicBlock) PostDominees() []*BasicBlock
func (b *BasicBlock) PostDominates(c *BasicBlock) bool
func (f *Function) PostdomPreorder() []*BasicBlock
func (f *Function) PostdomPostorder() []*BasicBlock {
func (b *BasicBlock) Ipdom() *BasicBlock
All of these are prototyped here.

CC @alandonovan

CC @timothy-king

See response on related issue https://github.com/golang/go/issues/46941#issuecomment-870097712.

Unlike dominance, the go/ssa package has no need for postdominance, so I don't think it should go to the trouble of computing it. But since go/ssa exposes the control-flow graph, it shouldn't be hard for clients that need it to compute it externally as the need arises.
Once there's an external implementation, we could consider a proposal to move it to a subpackage of go/ssa.

authors: adonovan chabbimilind findleyr ianlancetaylor timothy-king


text:
frequently pop: getting code actions from "go" in vendor directory when i save file and save slowly

What version of Go are you using (go version)?

$ go version
1.16.2

Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
mac
go env Output
$ go env
```
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.16.2"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/rf/1744zvy931d53cz_b2wd2sn11r4whl/T/go-build369641151=/tmp/go-build -gno-record-gcc-switches -fno-common"
```

What did you do?
when save my modify file in vendor dir, frequentyly pop getting code actions from "go" in vendor directory, and very slowly
but if i do that not in vendor dir, it save fast and not pop the hint
i try to set GO111MODULE to off/on/auto in vscode like that:
"go.toolsEnvVars": {
        "GO111MODULE": "off"
        // "GO111MODULE": "auto"
    },

but none of the problems are solved

What did you expect to see?
save fast in vendor dir
What did you see instead?

Transferring to vscode-go repo.
@cgyFight Please capture the gopls log following the instruction and share it with us. Thanks!

authors: cgyFight hyangah


text:
x/website: Linkable sections "Learning Resources" and "Meetups"

What is the URL of the page with the issue?
https://go.dev/learn/
Screenshot

What did you do?
Someone asked me for Go Learning Resources, so I wanted to provide them with the link to go.dev's section "Learning Resources".
What did you expect to see?
I needed either a clickable UI element to the URL of the "Learning Resources" section, or at least a specific id that I could find in the HTML source.
What did you see instead?
The fist section of the page is "Install the latest version of Go", which is not a Learning Resource.
The two H2 elements "Learning Resources" and "Meetups" on the page currently don't have an id attribute.

cc @dmitshur

CC @Lyoness, @pearring via owners.

authors: Deleplace dmitshur seankhliao