You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
I'm currently using rasn to parse ASN1. To verify outputs of various input files, I'm using serde-yaml to convert the final type into a string that I can store in files and then commit to the repository.
I'm hitting this error when trying to use the recursive version of a singleton map:
error: reached the recursion limit while instantiating `_::_serde::ser::impls::<impl Serialize for &singleton_map_recursive::SingletonMapRecursive<&singleton_map_recursive::SingletonMapRecursive<&...>>>::serialize::<...>`
--> /home/btr/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_yaml-0.9.32/src/with.rs:981:13
|
981 | / self.delegate.serialize(SingletonMapRecursive {
982 | | delegate: serializer,
983 | | })
| |______________^
|
note: `_::_serde::ser::impls::<impl Serialize for &'a T>::serialize` defined here
--> /home/btr/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.197/src/ser/impls.rs:506:1
|
506 | / deref_impl! {
507 | | <'a, T: ?Sized> Serialize for &'a T where T: Serialize
508 | | }
| |_^
= note: the full type name has been written to '/home/btr/Projects/_unimportant_/lib/target/debug/deps/_unimportant_-df951b3711978b56.long-type.txt'
= note: this error originates in the macro `deref_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
The full type mentioned in the error looks like this:
_::_serde::ser::impls::<implSerialize for &singleton_map_recursive::SingletonMapRecursive<&singleton_map_recursive::SingletonMapRecursive<&singleton_map_recursive::SingletonMapRecursive<&singleton_map_recursive::SingletonMapRecursive<&singleton_map_recursive::SingletonMapRecursive<&singleton_map_recursive::SingletonMapRecursive<&iso_9506_mms_1::_::<implSerialize for TypeSpecification>::serialize::__SerializeWith<'_>>>>>>>>::serialize::<singleton_map_recursive::SingletonMapRecursive<singleton_map_recursive::SingletonMapRecursive<singleton_map_recursive::SingletonMapRecursive<&mut serde_yaml::Serializer<&mutVec<u8>>>>>>
The types involved in this recursion currently look like this:
I know there's recursion handling in runtime code (probably not related to this), but this is something that fails to compile, and something like the recursion_limit attribute does not help.
I'm not sure if there's even a solution for this. In the meantime I'm using just "singleton_map", but obviously my output is missing data. Not optimal, but not the worst for now, as my dbg!() output told me the result is good as it is.
Any advice on this? Is there maybe a fix? Anything I can do?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi!
I'm currently using
rasn
to parse ASN1. To verify outputs of various input files, I'm usingserde-yaml
to convert the final type into a string that I can store in files and then commit to the repository.I'm hitting this error when trying to use the recursive version of a singleton map:
The full type mentioned in the error looks like this:
The types involved in this recursion currently look like this:
Also a minimal example would probably look like this? I can't seem to reproduce the above error in the playground.
I know there's recursion handling in runtime code (probably not related to this), but this is something that fails to compile, and something like the
recursion_limit
attribute does not help.I'm not sure if there's even a solution for this. In the meantime I'm using just "singleton_map", but obviously my output is missing data. Not optimal, but not the worst for now, as my
dbg!()
output told me the result is good as it is.Any advice on this? Is there maybe a fix? Anything I can do?
The text was updated successfully, but these errors were encountered: