Comments (6)
Thank you for the example; this is really helpful.
The tricky bit with comments in .avdl
files is that Avro accepts them almost everywhere.
For example, the following example shows errors in the plugin but Avro happily allows it (and attributes the comment inside Plain
to the next record Commented
):
protocol MyProtocol {
record Plain {
int number; /** record comment */
}
record Commented {
string text;
}
}
It was a conscious decision not to support every case.
Having said that, switching annotations and comments is not as weird as the example above, so the upcoming version 203.0.2 will no longer choke on it.
from avro-schema-support.
Thank you for your reaction. I tested version 203.0.2 and it works with the given example. However I found that my simplified example was too simple. The received file can still not be parsed because of another comment before the version.
Below is a new simplified example:
/**
* Copyright notice
*/
@version("1.0.0")
/**
Multi line Comment about the message
Multi line Comment about the message
*/
protocol MyProtocol {
}
I understand the struggles with the comments. In Xtext (a tool to create domain specific languages) you can specify that comments are hidden for the parser, therefore comments can be everywhere in the code. Maybe such a thing also exists for IntelliJ.
from avro-schema-support.
I can do that, but this would also remove the documentation comments from the elements. This in turn affects error handling by the parser, formatting, etc. Besides, it is actually a semantic error to specify two documentation comments for an element — the IDL parser will only use the last one.
I'll see if I can rework it as a warning (dangling doc comment).
from avro-schema-support.
The adjustments look good at first glance. Uploaded version 203.1.0.
from avro-schema-support.
This fixes parsing the files. I have some Dangling documentation warning
s in the files, but navigating the files works fine. I will report the warnings to the supplier.
Thanks for solving this issue!
from avro-schema-support.
Correct: I've added these warnings, as the Avro IDL parser will ignore them.
from avro-schema-support.
Related Issues (20)
- Crash Report null HOT 1
- Crash Report null HOT 1
- Crash Report null HOT 1
- Crash Report null HOT 1
- Crash Report null HOT 1
- Converting optional Collections. HOT 1
- Crash Report null HOT 1
- Crash Report null HOT 1
- Crash Report null HOT 1
- Crash Report null HOT 1
- Add logo and update icons HOT 1
- Crash Report: Attempt to modify PSI for non-committed Document HOT 1
- Crash Report null HOT 1
- Crash Report null HOT 1
- Crash Report null HOT 1
- Crash Report: file index corrupted while processing HOT 1
- Crash Report null HOT 1
- Crash Report null HOT 1
- Crash Report: exception while loading JSON schema
- Crash Report null HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avro-schema-support.