Comments (10)
I named common.go
to id_names_gen.go
in the PR
from opcua.
Edit: move PR comment on PR #680
from opcua.
I'm kinda on the fence about this. On one hand, I don't like adding complexity and code paths specifically to address IDE and web interface deficiencies, on the other hand, I also use Goland and have hit this issue before (though I "solved" it by bumping up Goland's limits). @magiconair thoughts?
from opcua.
I can follow the argument and usually have the same stance that it doesn't make any sense to alter code because some IDE is unhappy. But even using VI or any editor this file is just too big 😄.
One note: I utilize the categories (type or whatever edit: NodeClass
) the OPC-UA spec provides in the last column of the CSV. So from the spec those IDs are split up already. Splitting them up even more like I suggested would then fall again in the argument I brought up in the first sentence. So practically besides issues in Goland I had trouble generating code from it in plc4x using Java as it would either overflow the maximum number of enums supported 65535 or it would just overflow the static initalizer with too much bytes.
But as I wrote above: It doesn't hurt to segment. The imports/api look completely identical it is just split up into multiple files and makes it even more readable using any editor/viewer.
(edit: referring to #680 in this comment)
from opcua.
Hmm, this works just fine in VSCode and neovim. Isn't this a limit that you can tune in Goland? Seems like an arbitrary limit.
I could live with splitting the enums and the map into two different files but making a random split because of a Goland limit seems pretty weird. Let's try to fix the IDE first.
from opcua.
I also don't follow the code-generation limit argument. The number of enum values does not change. So why would splitting into multiple files not hit that limit?
Also, since the code generator is java you should be able to just provide more memory with -Xmx
or not?
I don't think we had such a situation before and I'm also a bit on the fence here. On the one hand this code should just work. On the other hand I don't know how many people actually have this problem and whether the ones who do haven't just updated their settings and moved on. That's what I would do at least.
We can add something to the README if there is a simple workaround. If there isn't and the library is otherwise unusable with either tool then we should fix it.
from opcua.
If we have to split it up then I'd suggest we do this by id since this doesn't require any complex semantics or regular expressions. For example
id_00000_gen.go
id_10000_gen.go
id_20000_gen.go
...
id_names_gen.go
from opcua.
@sruehl is this still relevant?
from opcua.
I've just asked a friend to check this and he says that there is a button to enable the syntax highlighting with the suggestions to bump the memory and the instructions to do so.
from opcua.
yeah, but as I said this is still a pretty big file and splitting it up with the categories they supply upstream (#680) helps readability.
So even if I fix it for my particular IDE, Github still doesn't render it well.
from opcua.
Related Issues (20)
- Error writing ByteString array (readChunk EOF)
- Call has no InputArguments
- EOF when connecting via secure connection HOT 4
- Working Server Example HOT 28
- Inconsistent Data when get opc value from kepserver 5.21 HOT 1
- monitor: add support to modify subscription, monitored items, and set monitoring mode
- subscription: add SetMonitoringMode functionality
- subscription: add ModifySubscription functionality
- Trouble with calling NewClient() HOT 1
- Connection Refused with Valid Security Options HOT 1
- ReverseHello, invalid endpoint
- nil pointer when reading data with ua-datatype TypeIDNull
- Get rid of dependencies HOT 3
- Error when using expanded nodeid
- Feture: Reduce memory allocation during the Encode process to improve encoding performance.
- SIGSEGV when attempting to reading i=84 against simulator.
- [Question] Need some help registering custom UDTs
- Bug: Client fails to trust CA signed server certificates
- Example / Method for browsing nodes to get the child node and its details
- The extension object cannot be (de)serialized because the data type id is not recognized. StatusBadDataTypeIdUnknown (0x80110000)
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 opcua.