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

CodeController.foldImports does not fold a multiline import in Go #136

Closed
alexeyinkin opened this issue Jan 5, 2023 · 1 comment · Fixed by #143
Closed

CodeController.foldImports does not fold a multiline import in Go #136

alexeyinkin opened this issue Jan 5, 2023 · 1 comment · Fixed by #143
Labels

Comments

@alexeyinkin
Copy link
Contributor

Reproducible with MinimalWordCount example in Playground. In short:

// license
// license
package main

import (
  "context"
  "fmt"
  "regexp"

  "github.com/apache/beam/sdks/v2/go/pkg/beam"
  "github.com/apache/beam/sdks/v2/go/pkg/beam/io/textio"
  "github.com/apache/beam/sdks/v2/go/pkg/beam/runners/direct"
  "github.com/apache/beam/sdks/v2/go/pkg/beam/transforms/stats"

  _ "github.com/apache/beam/sdks/v2/go/pkg/beam/io/filesystem/gcs"
  _ "github.com/apache/beam/sdks/v2/go/pkg/beam/io/filesystem/local"
)
@alexeyinkin alexeyinkin added the P2 label Jan 5, 2023
@alexeyinkin
Copy link
Contributor Author

The block is recognized as union because the imports block is joined with the parentheses block. Things to try:

  1. If joining imports block with anything, the joined type must be imports.
  2. Check how this works without package line. Does import on its own create a block? If not, then the result will just be a parentheses block. Need a workaround for this.

alexeyinkin added a commit that referenced this issue Jan 16, 2023
…rvice comment, export TextEditingValue.typed, add TextEditingValue.select (#136)
alexeyinkin added a commit that referenced this issue Jan 16, 2023
alexeyinkin added a commit that referenced this issue Jan 17, 2023
alexeyinkin added a commit that referenced this issue Jan 17, 2023
…rvice comment, export TextEditingValue.typed, add TextEditingValue.select (#143)

* Fix FoldableBlock.joinIntersecting(), fix newline handling after a service comment, export TextEditingValue.typed, add TextEditingValue.select (#136)

* Rename a test (#136)

* Fix after review (#136)
alexeyinkin added a commit that referenced this issue Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant