bufbuild / intellij-buf Goto Github PK
View Code? Open in Web Editor NEWIntelliJ plugin for Buf
Home Page: https://plugins.jetbrains.com/plugin/19147-buf-for-protocol-buffers
License: Apache License 2.0
IntelliJ plugin for Buf
Home Page: https://plugins.jetbrains.com/plugin/19147-buf-for-protocol-buffers
License: Apache License 2.0
When a proto file larger than 8192 chars has Reformat Code run, newlines are introduced after each 8192 chars.
This does not happen to the file when buf format
is run on the same file.
This obviously can break the syntax of the proto file in various ways, which subsequently breaks protoc
compilation and future buf format
executions.
In the latter case, there's an additional issue that a Reformat Code run on a file with invalid syntax fails and clears the IntelliJ editor buffer.
(e.g. buf format
would report a Failure: filename.proto:245:8: syntax error
)
It looks like the output of buf format
is being read from stdout
and joined with separating newlines at https://github.com/bufbuild/intellij-buf/blob/main/src/main/kotlin/build/buf/intellij/formatter/BufFormatterService.kt#L66 , when in this case it should probably just be concatenated verbatim without separators.
I'm using Goland (2022.2) with buf 1.7.0 and non-well-known-types are not resolving and show an error, even though . Unlike #37, well known types work just fine. Running buf build
and buf generate
work as expected with no errors, and the generated code uses the date package. This is my first time importing an external dependency, so I am not sure if this worked before or not.
conversation here: https://bufbuild.slack.com/archives/CRZ680FUH/p1661382658841319
Here's a barebones example that I believe should reproduce the issue, though I haven't tested it locally.
syntax = "proto3";
package billing;
import "google/type/date.proto";
import "google/protobuf/timestamp.proto";
message Test
google.type.Date date = 1;
google.protobuf.Timestamp timestamp = 2;
}
buf.yaml
version: v1
build:
excludes:
- bazel-bin
- bazel-go.nozzle.io
- bazel-out
- bazel-testlogs
deps:
- buf.build/googleapis/googleapis
lint:
use:
- DEFAULT
breaking:
use:
- FILE
buf.gen.yaml
version: v1
managed:
enabled: true
go_package_prefix:
default: go.nozzle.io
except:
- buf.build/googleapis/googleapis
plugins:
- name: go
out: .
opt: paths=source_relative
- name: go-grpc
out: .
opt:
- paths=source_relative
- require_unimplemented_servers=false
- name: go-json
out: .
opt:
- paths=source_relative
- enums_as_ints=false
- emit_defaults=false
- orig_name=false
- allow_unknown=false
buf.lock
version: v1
deps:
- remote: buf.build
owner: googleapis
repository: googleapis
commit: 80720a488c9a414bb8d4a9f811084989
I'm seeing this error logged after upgrading to IntelliJ 2023.2:
com.intellij.diagnostic.PluginException: No display name is specified for configurable build.buf.intellij.configurable.BufConfigurable in xml file;
specify it using 'displayName' or 'key' attribute to avoid necessity to load the configurable class when Settings dialog is opened [Plugin: com.github.bufbuild.intellij]
One of the biggest points of developer friction when working with protos is regenerating stubs after changing the protos. As quick as the Buf generator is, it would make a lot of sense for it to be automatically run any time proto files in its workspace are modified.
Example workflow:
Without this feature, developers need an extra step between 4 and 5 to manually re-run the buf generate
command. It's not super time-consuming, but it's extra friction and context switching that can break flow.
Related: I've filed the same request for the VSCode plugin as bufbuild/vscode-buf#187
Standardize this intellij-buf
repository with other bufbuild repositories:
Auto-import of messages is not working in Webstorm with remote packages. Users would like to be able to enter a message name and have Webstorm auto-import the full name without having to manually type it.
Note: This is also an issue in VS Code as well: bufbuild/vscode-buf#206
If the buf binary is vendored, it won't be available through PATH. Let us set its location manually in the tools preferences pane
The buf plugin conflicts with the official protobuffers plugin
Hi, I am working on integrating buf and installed the intellij plugin. I suggest that the plugin is updated to register the JSON schemas for the yaml files - so these are validated by the IDE.
According to this docs, The well-known types are built into the compiler and are referenced at compile time. Please do not depend on this module.
https://buf.build/beta/wellknowntypes/docs
How do I make GoLand / IntelliJ aware of wellknowntypes?
GoLand
This plugin causes auto-save to trigger immediately after I stop typing when a proto file is open but not in focus
Example:
Have a .go file open, open a .proto file -> split and move right
Add a new line to the .go file, auto-save is triggered and go fmt runs removing the newline
Similar to this issue, but I confirmed it is specifically the buf plugin causing it for me: https://youtrack.jetbrains.com/issue/WEB-54949/auto-save-as-soon-as-stop-typing
vsc plugin works fine,but goland plugin didn't work
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.