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
The SP releases around 1.0.28/1.0.29 appear to contain two enums with the name SprotError. They're in different namespaces, obviously, but humility nonetheless must currently throw up its hands:
$ pfexec /tmp/humility hiffy -c SpRot.status
humility: attached to 0483:3754:003300324741500820383733 via ST-Link V3
humility hiffy failed: SprotError matches more than one enum: attest_data::messages::SprotError as GOFF 0x00039350 (object 21), drv_sprot_api::error::SprotError as GOFF 0x00044a4a (object 21)
$ /tmp/humility --version
humility 0.11.11
While it's true that the ultimate fix for this is likely to be more specific in the idol file in Hubris itself, that doesn't help folks trying to get by with images that have already been built and are in use. We could provide a way for the user to provide clarity when possible; e.g., an environment variable override might look like:
diff --git a/humility-core/src/hubris.rs b/humility-core/src/hubris.rs
index 5664e4e2..e2ca445b 100644
--- a/humility-core/src/hubris.rs+++ b/humility-core/src/hubris.rs@@ -6445,6 +6445,46 @@ impl HubrisModule {
.dedup(v.iter().filter(|g| g.object == self.object))?;
if m.len() > 1 {
+ /*+ * Allow the user to provide more specific type names by+ * passing a comma separated list of mappings like+ * "ShortName=long::name::ShortName" in the HIFFY_PHRASEBOOK+ * environment variable.+ */+ if let Ok(pb) = std::env::var("HIFFY_PHRASEBOOK") {+ for t in pb.split(',') {+ if let Some((k, v)) = t.split_once('=') {+ if k == name {+ /*+ * We have a phrase book entry for this+ * name! Check the filtered results to+ * see if there is a single match:+ */+ let m = m.iter().find(|g| {+ let ge = hubris.enums.get(g).unwrap();++ if let Ok(Some(name)) =+ hubris.namespaces.to_full_name(+ ge.namespace,+ &name.to_string(),+ )+ {+ name == v+ } else {+ false+ }+ });++ if let Some(m) = m {+ return Ok(Some(+ hubris.enums.get(&m).unwrap(),+ ));+ }+ }+ }+ }+ }+
let all = m
.iter()
.map(|g| {
The text was updated successfully, but these errors were encountered:
The SP releases around 1.0.28/1.0.29 appear to contain two enums with the name SprotError. They're in different namespaces, obviously, but humility nonetheless must currently throw up its hands:
While it's true that the ultimate fix for this is likely to be more specific in the idol file in Hubris itself, that doesn't help folks trying to get by with images that have already been built and are in use. We could provide a way for the user to provide clarity when possible; e.g., an environment variable override might look like:
The text was updated successfully, but these errors were encountered: