Comments (3)
One of the workarounds I tried was multiple --using options, but it resulted in the following exception which pointed to a bad join on aliased types and made me think that only the single option was being read.
System.TypeInitializationException was unhandled by user code
HResult=-2146233036
Message=The type initializer for 'Cache2' threw an exception. Source=Bond TypeName=Cache
2
StackTrace:
at Bond.Serialize.To[W,T](W writer, T obj)
at Bond.Bonded1.Bond.IBonded.Serialize[W](W writer) at lambda_method(Closure , Object , CompactBinaryWriter
1 )
at Bond.Serializer1.Serialize(Object obj, W writer) at Bond.Serialize.To[W,T](W writer, T obj) InnerException: System.ArgumentNullException HResult=-2147467261 Message=Value cannot be null. Parameter name: field Source=System.Core ParamName=field StackTrace: at System.Linq.Expressions.Expression.Field(Expression expression, FieldInfo field) at Bond.Expressions.DataExpression.PropertyOrField(Expression expression, String name) at Bond.Expressions.ObjectParser.Field(ITransform transform, Expression structVar, UInt16 id, ISchemaField schemaField, IField field) at Bond.Expressions.ObjectParser.<>c__DisplayClassc.<Apply>b__7(<>f__AnonymousType0
2 <>h__TransparentIdentifier0, IField knownField)
at System.Linq.Enumerable.d__43.MoveNext() at System.Collections.Generic.List
1.InsertRange(Int32 index, IEnumerable1 collection) at System.Collections.Generic.List
1.AddRange(IEnumerable1 collection) at Bond.Expressions.ObjectParser.Apply(ITransform transform) at Bond.Expressions.SerializerTransform
2.Struct(IParser parser, RuntimeSchema schema, Boolean isBase)
at Bond.Expressions.SerializerTransform2.Struct(IParser parser, RuntimeSchema schema) at Bond.Expressions.SerializerTransform
2.<>c__DisplayClass2.b__0(IParser p)
at Bond.Expressions.SerializerGenerator2.GenerateSerialize(Serialize serialize, IParser parser, ParameterExpression writer, Boolean inline) at Bond.Expressions.SerializerTransform
2.GenerateSerialize(SerializeWithSchema serializeWithSchema, IParser parser, RuntimeSchema schema)
at Bond.Expressions.SerializerTransform2.Value(IParser parser, Expression valueType, RuntimeSchema schema) at Bond.Expressions.SerializerTransform
2.<>c__DisplayClassc.<>c__DisplayClasse.b__7(IParser fieldParser, Expression fieldType)
at Bond.Expressions.Field.Bond.Expressions.IField.Value(IParser parser, Expression valueType)
at Bond.Expressions.ObjectParser.Field(ITransform transform, Expression structVar, UInt16 id, ISchemaField schemaField, IField field)
at Bond.Expressions.ObjectParser.<>c__DisplayClassc.b__7(<>f__AnonymousType02 <>h__TransparentIdentifier0, IField knownField) at System.Linq.Enumerable.<SelectManyIterator>d__4
3.MoveNext()
at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable
1 collection)
at System.Collections.Generic.List1.AddRange(IEnumerable
1 collection)
at Bond.Expressions.ObjectParser.Apply(ITransform transform)
at Bond.Expressions.SerializerTransform2.Struct(IParser parser, RuntimeSchema schema, Boolean isBase) at Bond.Expressions.SerializerTransform
2.Struct(IParser parser, RuntimeSchema schema)
at Bond.Expressions.SerializerTransform2.<>c__DisplayClass2.<GenerateSerialize>b__0(IParser p) at Bond.Expressions.SerializerGenerator
2.GenerateSerialize(Serialize serialize, IParser parser, ParameterExpression writer, Boolean inline)
at Bond.Expressions.SerializerTransform2.GenerateSerialize(SerializeWithSchema serializeWithSchema, IParser parser, RuntimeSchema schema) at Bond.Expressions.SerializerTransform
2.Generate(IParser parser)
at Bond.Serializer1..ctor(Type type) at Bond.Serialize.Cache
2..cctor()
InnerException:
from bond.
Multiple aliases are definitely supported, e.g. see the tests.
If you post link to your project I can take a look what might be the problem.
from bond.
Since there are unit tests with multiple type aliases I suspect that this is not the problem so I'm closing this issue. Please open an issue with more specific information (ideally a repro).
from bond.
Related Issues (20)
- Bond generated headers don't work for clang in c++20 HOT 2
- Include enums in Bond runtime schema HOT 1
- cmake/Config.cmake looks for the EOLed Python-2.7 HOT 1
- Deserialization/serialization under Linux is 7x-10x slower than Windows HOT 2
- [C#] gbc.exe: Exec format error inside mcr.microsoft.com/dotnet/sdk:latest docker image. HOT 3
- "openFile: does not exist (No such file or directory)" on Linux HOT 3
- [C#] Deserializing bond-like strings into dynamic type HOT 2
- Linux build error - ghc: panic! HOT 4
- Support dotnet trimming HOT 5
- Target `netstandard2.0` for c# HOT 1
- C++: GCC: Double/Float comparison warning HOT 2
- Is this project still being maintained? HOT 2
- emit #nullable enable pragma in generated C# code
- bond on aarch64 is failing with unsupported LLVM
- [msvc][cpplatest] bond failed to build with msvc option /std:c++latest due to error C2027 and error C2061
- Upgrade to Stack lts-22.12 for aarch64 support
- Simple usage example for python HOT 1
- Is it possible to use Python bindings without Boost? HOT 1
- Compilation failed with msvc version 14.39.33519
- Following HLint suggestions?
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 bond.