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

fix(tools/spxls): include spx deps in pkgdata and resolve LS issues #1209

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

aofei
Copy link
Member

@aofei aofei commented Jan 8, 2025

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 6 out of 14 changed files in this pull request and generated 1 comment.

Files not reviewed (8)
  • tools/spxls/internal/server/compile.go: Evaluated as low risk
  • tools/spxls/internal/server/completion_test.go: Evaluated as low risk
  • tools/spxls/internal/server/document_test.go: Evaluated as low risk
  • tools/spxls/internal/server/format_test.go: Evaluated as low risk
  • tools/spxls/internal/server/completion.go: Evaluated as low risk
  • tools/spxls/internal/vfs/mapfs.go: Evaluated as low risk
  • tools/spxls/internal/server/hover_test.go: Evaluated as low risk
  • tools/spxls/internal/util/enclosing.go: Evaluated as low risk
Comments suppressed due to low confidence (2)

tools/spxls/internal/pkgdata/gen/main.go:44

  • The import path should be split using forward slashes ('/') instead of the OS-specific path separator.
return slices.ContainsFunc(strings.Split(importPath, string(os.PathSeparator)), func(part string) bool {

tools/spxls/internal/server/util.go:202

  • The function toLowerCamelCase does not handle Unicode characters correctly. Use unicode.ToLower instead.
return string(s[0]|32) + s[1:]

tools/spxls/internal/server/spx_definition.go Show resolved Hide resolved
@qiniu-ci
Copy link

qiniu-ci commented Jan 9, 2025

This PR has been deployed to the preview environment. You can explore it using the preview URL.

Warning

Please note that deployments in the preview environment are temporary and will be automatically cleaned up after a certain period. Make sure to explore it before it is removed. For any questions, contact the Go+ Builder team.

@aofei aofei requested a review from Copilot January 9, 2025 04:10

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 6 out of 14 changed files in this pull request and generated no comments.

Files not reviewed (8)
  • tools/spxls/internal/server/completion_test.go: Evaluated as low risk
  • tools/spxls/internal/server/completion.go: Evaluated as low risk
  • tools/spxls/internal/vfs/mapfs.go: Evaluated as low risk
  • tools/spxls/internal/server/document_test.go: Evaluated as low risk
  • tools/spxls/internal/server/hover_test.go: Evaluated as low risk
  • tools/spxls/internal/util/enclosing.go: Evaluated as low risk
  • tools/spxls/internal/server/compile.go: Evaluated as low risk
  • tools/spxls/internal/server/util.go: Evaluated as low risk
Comments suppressed due to low confidence (4)

tools/spxls/internal/server/spx_definition.go:479

  • [nitpick] Ensure that the renaming from nonMainPkgSpxDefsCacheForFuncs to nonMainPkgSpxDefCacheForFuncs is consistent and clear throughout the code.
var nonMainPkgSpxDefCacheForFuncs sync.Map // map[nonMainPkgSpxDefCacheForFuncsKey]SpxDefinition

tools/spxls/internal/server/spx_definition.go:489

  • Verify that the new implementation of NewSpxDefinitionForFunc correctly handles all cases of overloaded functions and does not miss any important functionality.
func NewSpxDefinitionForFunc(fun *types.Func, recvTypeName string, pkgDoc *pkgdoc.PkgDoc) (def SpxDefinition) {

tools/spxls/internal/server/spx_definition.go:390

  • [nitpick] Check that the updated documentation is accurate and helpful.
// NewSpxDefinitionForConst creates a new [SpxDefinition] for the provided constant.

tools/spxls/internal/server/format.go:84

  • The assignment of firstVarBlock.Rparen should be done only if len(varBlocks) > 1. Otherwise, it should be set to firstVarBlock.End().
firstVarBlock.Rparen = firstVarBlock.End()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LS detail problems
2 participants