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

buf 配置逻辑问题 #145

Closed
ercJuL opened this issue Dec 20, 2022 · 4 comments
Closed

buf 配置逻辑问题 #145

ercJuL opened this issue Dec 20, 2022 · 4 comments

Comments

@ercJuL
Copy link

ercJuL commented Dec 20, 2022

  • 设置里 保存 buf 配置会存储到 .idea/protobuf.xml
  • 当使用buf 时读取的配置是 .idea/workspace.xml

我当前的配置

image

.idea/protobuf.xml 配置

image

.idea/workspace.xml 配置

image

实际运行 buf 错误提示

image

IDE info

GoLand 2022.3
Build #GO-223.7571.176, built on November 29, 2022
Licensed to caroline helwe
Subscription is active until September 1, 2023.
For educational use only.
Runtime version: 17.0.5+1-b653.14 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.1
GC: G1 Young Generation, G1 Old Generation
Memory: 8192M
Cores: 10
Metal Rendering is ON
Registry:
suggest.all.run.configurations.from.context=true
debugger.new.tool.window.layout=true
ide.completion.variant.limit=500
ide.experimental.ui=true

Non-Bundled Plugins:
com.markskelton.one-dark-theme (5.7.2)
com.github.copilot (1.1.37.2188)
String Manipulation (9.6.1)
commit-message-helper-idea-plugin (1.1.0)
com.mallowigi (80.0.0)
izhangzhihao.rainbow.brackets (2022.3.5)
com.ypwang.plugin.go-linter (1.6.3)
io.kanro.idea.plugin.protobuf (1.6.30)

@devkanro
Copy link
Owner

workspace.xml 里面的是运行配置,protobuf 里面的是解析用的 buf,两个地方可以是不一样,你改改运行配置就行

@devkanro
Copy link
Owner

不过嘛,默认的情况下,创建运行配置的时候应该用的就是设置里面的

@ercJuL
Copy link
Author

ercJuL commented Dec 30, 2022

默认情况是这样,但是设置里更新路径后, workspace没有跟着更新,这就导致设置更新后,如果要正常运行 buf 需要手动改 workspace 的配置

建议路径逻辑 下面二选一

  • 设置里区分全局设置和当前工程设置
  • buf 路径只读 设置里设置的路径

@devkanro
Copy link
Owner

在接下来的版本中,我会停止维护插件中的 buf 支持,这部分的功能会由官方 Buf 插件代替。

请关注下面 PR 的状态,如果官方 Buf 插件不接受我的 PR,我会创建一个此插件的分支。

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

No branches or pull requests

2 participants