Closed focusaurus closed 6 years ago
Hi,
Indeed, it seems nom_pem does not build when enabling the verbose_errors
feature. This is caused by this line (https://github.com/bpressure/nom_pem/blob/master/src/lib.rs#L63):
pub enum PemParsingError {
NomError(nom::Err), // <----------
Incomplete(nom::Needed)
}
The Err
type is different with simple_errors (Err<E>
) and verbose_errors (Err<P,E>
), so it's not possible to link the two crates. @Geal, any idea ?
this is something that's solved in nom 4.0, but it's not released yet (there's an alpha version at nom 4.0.0-alpha1). Right now, I'd advise to translate the nom error to something else, so that this version does not appear in nom_pem's public API.
On Thu, Dec 14, 2017 at 9:00 PM, Pierre Chifflier notifications@github.com wrote:
Hi, Indeed, it seems nom_pem does not build when enabling the verbose_errors feature. This is caused by this line (https://github.com/bpressure/ nom_pem/blob/master/src/lib.rs#L63):
pub enum PemParsingError { NomError(nom::Err), // <---------- Incomplete(nom::Needed) }
The Err type is different with simple_errors (Err
) and verbose_errors ( Err<P,E>), so it's not possible to link the two crates. @Geal https://github.com/geal, any idea ? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rusticata/der-parser/issues/6#issuecomment-351820054, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHSADQAAvNhcW9yjxsPMaqEoWwx-gz4ks5tAX55gaJpZM4RCjo5 .
CC @bpressure FYI.
I have a working work around by forking nom_pem and adjusting to use verbose-errors.
I'm running into some kind of dependency conflict trying to use both der-parser=0.4.4 and nom_pem=1.0.3. When I add both of these, I can't compile nom_pem.
I think maybe it has something to do with the
verbose-errors
feature maybe?