Comments (8)
Can you provide the places where the #nullable disable needs to go?
from ua-modelcompiler.
at the top of the .Classes.cs file and the .DataTypes.cs file. The files are riddled with nullable violations
from ua-modelcompiler.
Not surprising since the code was written before that feature existed in the C# language. But it also means that making it nullable compliant would break existing code so it can never be more than option that has to be enabled during generation.
from ua-modelcompiler.
Looks like #nullable disable is not an option given all the different frameworks that the Core library has to build against:
Error CS8370 Feature 'nullable reference types' is not available in C# 7.3. Please use language version 8.0 or greater.
See OPCFoundation/UA-.NETStandard#2300
from ua-modelcompiler.
crazy that there is no preprocessor switch that could help here... but a commandline switch during generation would be perfectly fine!
from ua-modelcompiler.
The language version is explicitly set to 7.3 in the Core library.
If you know a way to create a constant like this:
#if CSHARP_8_OR_NEWER
#nullable disable
#endif
Then it will be possible to update the generated code.
I tried to find a way to do it but none of them worked and I have no more time right now.
from ua-modelcompiler.
I also tried to find a solution like that but I could not find a pretty one. The best solution would be to add a nullable switch to the executable but then it would a bit much to add that switch just to print those three lines... Ideally it would be nice to have a switch to properly generate nullable enabled code but I realize that is not so simple...
from ua-modelcompiler.
Marked as nice-to-have enhancement but switching to nullable is not trival. It requires a rethink of almost every line of code.
from ua-modelcompiler.
Related Issues (20)
- PackML code generation wrong HOT 6
- Option to support VB for auto-generation HOT 1
- Template 'ModelCompiler.Templates.XmlSchema.Union.xml' not found. HOT 1
- Compilation error HOT 11
- OPC UA TMC Compiler Problem HOT 1
- [Bug] ModelCompiler can't compile from `master` branch
- [Bug] NodeSet2 XML namespaces are wrongly escaped HOT 3
- [Bug] NodeSet2 XML namespaces with minus in are wrongly escaped HOT 1
- ModelCompiler invalid code for abstract datatypes HOT 5
- Compiled Dotnet files are missing a definition HOT 2
- Model compiler fails due to invalid DateTime format HOT 2
- Error trying to compile the LADS nodeset HOT 4
- Error reading resource 'ModelCompiler.CSVs.MDIS.csv' HOT 1
- Compile Error (is not recognized as an internal or external command) HOT 5
- Error generating references from ModelDesign HOT 3
- Trouble compiling multiple XML model files HOT 2
- UA-ModelCompiler not generating method arguments in compiled NodeSet2 xml HOT 2
- Invalid node id references when compiling multiple XML informational models HOT 8
- Method generating custom method state in C#, but says it could not be found 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 ua-modelcompiler.