Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: too slow on large number of files #33531

Open
svanharmelen opened this issue Aug 7, 2019 · 17 comments
Open

x/tools/gopls: too slow on large number of files #33531

svanharmelen opened this issue Aug 7, 2019 · 17 comments
Assignees
Milestone

Comments

@svanharmelen
Copy link

@svanharmelen svanharmelen commented Aug 7, 2019

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
@gopherbot gopherbot added this to the Unreleased milestone Aug 7, 2019
@gopherbot gopherbot added the gopls label Aug 7, 2019
@svanharmelen

This comment has been minimized.

Copy link
Author

@svanharmelen svanharmelen commented Aug 7, 2019

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
@svanharmelen

This comment has been minimized.

Copy link
Author

@svanharmelen svanharmelen commented Aug 7, 2019

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.

@svanharmelen

This comment has been minimized.

Copy link
Author

@svanharmelen svanharmelen commented Aug 7, 2019

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

@stamblerre

This comment has been minimized.

Copy link
Contributor

@stamblerre stamblerre commented Aug 7, 2019

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

@stamblerre

This comment has been minimized.

Copy link
Contributor

@stamblerre stamblerre commented Aug 8, 2019

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 stamblerre changed the title x/tools/cmd/gopls: 'failed to cache file' i.c.w. 'no AST for file' errors x/tools/gopls: fails on large number of files Aug 8, 2019
@stamblerre stamblerre changed the title x/tools/gopls: fails on large number of files x/tools/gopls: slow on large number of files Aug 8, 2019
@svanharmelen

This comment has been minimized.

Copy link
Author

@svanharmelen svanharmelen commented Aug 8, 2019

@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).

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 files could possibly be open at this point in the code?

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

@svanharmelen svanharmelen changed the title x/tools/gopls: slow on large number of files x/tools/gopls: fails on large number of files (on MacOS) Aug 8, 2019
@svanharmelen

This comment has been minimized.

Copy link
Author

@svanharmelen svanharmelen commented Aug 8, 2019

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" 😏

@stamblerre

This comment has been minimized.

Copy link
Contributor

@stamblerre stamblerre commented Aug 8, 2019

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.

@stamblerre

This comment has been minimized.

Copy link
Contributor

@stamblerre stamblerre commented Aug 8, 2019

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.

@svanharmelen

This comment has been minimized.

Copy link
Author

@svanharmelen svanharmelen commented Aug 8, 2019

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. And while the telemetry worker has a throttling side effect, it's limit is too high for the MacOS limit.

Do you agree this is the root cause? If so the fix is pretty straight forward (just swapping a few lines), so I can make a PR for that.

@stamblerre

This comment has been minimized.

Copy link
Contributor

@stamblerre stamblerre commented Aug 8, 2019

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

@svanharmelen

This comment has been minimized.

Copy link
Author

@svanharmelen svanharmelen commented Aug 8, 2019

@stamblerre stamblerre changed the title x/tools/gopls: fails on large number of files (on MacOS) x/tools/gopls: fails on large number of files Aug 8, 2019
@stamblerre

This comment has been minimized.

Copy link
Contributor

@stamblerre stamblerre commented Aug 8, 2019

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.

@stamblerre stamblerre changed the title x/tools/gopls: fails on large number of files x/tools/gopls: too slow on large number of files Aug 8, 2019
@svanharmelen

This comment has been minimized.

Copy link
Author

@svanharmelen svanharmelen commented Aug 8, 2019

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

@myitcv

This comment has been minimized.

Copy link
Member

@myitcv myitcv commented Nov 27, 2019

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?

@stamblerre

This comment has been minimized.

Copy link
Contributor

@stamblerre stamblerre commented Nov 27, 2019

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?

@myitcv

This comment has been minimized.

Copy link
Member

@myitcv myitcv commented Nov 27, 2019

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.