stefansjs / flatbuffers-intellij-plugin Goto Github PK
View Code? Open in Web Editor NEWA flatbuffers schema editing plugin for the IntelliJ platform
License: Other
A flatbuffers schema editing plugin for the IntelliJ platform
License: Other
field declarations may currently use any type. When the reference finder finds nothing, there is no warning highlighting. There should be warning underline for unknown types.
this is not valid, this attribute must be specified on declaration of Extension Point only (https://plugins.jetbrains.com/docs/intellij/plugin-extension-points.html#dynamic-extension-points), not actual usages
The 0.1.1 version of the plugin is rather slow with parsing and syntax highlighting. I'll want to do some performance tuning using features of the grammarkit bnf grammar. Additionally, a lot of syntax highlighting fails when some statements are incomplete.
https://github.com/JetBrains/Grammar-Kit/blob/master/grammars/Grammar.bnf?source=c#L53
The parser doesn't tolerate the use of native_include
in the schema and all subsequent parsing breaks.
In most languages cmd+/ will comment/uncomment a line. Figure out how to implement this for flatbuffers.
GitHub Actions has made many updates since the last build of this plugin. Investigate and update GitHub Actions for building the plugin:
Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/checkout@v2, actions/setup-java@v1, actions/cache@v2, actions/upload-artifact@v2
The set-output
command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
The save-state
command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
When one field fails to parse the rest of the fields in the table tend to fail.
Currently the parser errors when parsing multi-line comments inside of flatbuffer files e.g. something like:
namespace blah;
/**
* Test
*
* Describes test in more detail
*/
table Test {
/**
* The ID of this connection.
*/
a:string;
}
My first thought is to actually make a namespace part of the PSI hierarchy. I think this is how the flatbuffers compiler parses namespaces. I will need to investigate how reasonable this is
With the following Flatbuffer schema (which flatc
is happy to consume):
attribute "MyAttribute";
union MyOneUnion (MyAttribute) {
MyOneUnionFirst,
MyOneUnionSecond,
}
table MyOneUnionFirst {
}
table MyOneUnionSecond {
}
I get an error reported by the plugin:
flatbuffers.LCURLY expected, got '('
Just want to say that it's a very helpful plugin! Thank you for the effort you've put into it. :)
i.e
struct Blob {
data: [uint8:42];
}
This seems pretty important
https://plugins.jetbrains.com/docs/intellij/code-style-settings.html
If a namespace is provided as part of an enum value, the parser fails to identify it. This should use the existing type reference.
First of all, thumbs up for the plugin.
I've just noticed the parser fails when a reserved keyword is used as a field name. This is perfectly valid flatbuffers schema:
table Typeful {
id : uint64 ;
int : int ;
int8 : int8 ;
int16 : int16 ;
int32 : int32 ;
int64 : int64 ;
uint : uint ;
uint8 : uint8 ;
uint16 : uint16 ;
uint32 : uint32 ;
uint64 : uint64 ;
bool : bool ;
string : string ;
stringvector : [string] ;
byte : byte ;
ubyte : ubyte ;
bytevector : [byte] ;
ubytevector : [ubyte] ;
float32 : float32 ;
float64 : float64 ;
float : float ;
double : double ;
}
Some languages allow you to collapse the function/class block in the IDE. I don't yet know what this involves, but probably involves changing the parser to identify where the curly braces start/stop
When the parser/lexer fails it tend to fail catastrophically. Use the pin
and recoverWhile
attributes of the flatbuffers grammar to make better error-handling when parsing.
}
of table/enum/struct declarations;
of field declarationsrecoverWhile depends on the proper use of the pin
attribute. This will take quite a bit of testing and unit testing the results may be brittle to each individual change. We'll need unit tests that have partial parsing failures to ensure that recovery happens in the way people would reasonably expect
Hi,
Consider such schema
struct F
{
f: [int:16];
}
which is fixed size array is allowed. However, the plugins highlight this part as an syntax error.
Rename refactoring doesn't work when clicking on a referenced type. Rename refactoring is not available for declarations.
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.