Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fully qualify SpiError, task_net_api::{SendError, RecvError} types in Idol #1689

Merged
merged 3 commits into from
Mar 29, 2024

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Mar 28, 2024

This fixes name collisions between drv_spi_api::SpiError and gateway_messages::sp_to_mgs::SpiError, and between task_net_api::{SendError, RecvError} and smoltcp::{SendError, RecvError} that confuses Humility, as in:

humility: WARNING: SpiError matches more than one enum: drv_spi_api::SpiError as GOFF 0x0000786b (object 4), gateway_messages::sp_to_mgs::SpiError as GOFF 0x00010532 (object 4)
humility: WARNING: SpiError matches more than one enum: drv_spi_api::SpiError as GOFF 0x0000786b (object 4), gateway_messages::sp_to_mgs::SpiError as GOFF 0x00010532 (object 4)
humility: WARNING: SpiError matches more than one enum: drv_spi_api::SpiError as GOFF 0x0000786b (object 4), gateway_messages::sp_to_mgs::SpiError as GOFF 0x00010532 (object 4)
humility: WARNING: SpiError matches more than one enum: drv_spi_api::SpiError as GOFF 0x0000786b (object 4), gateway_messages::sp_to_mgs::SpiError as GOFF 0x00010532 (object 4)
humility: WARNING: SpiError matches more than one enum: drv_spi_api::SpiError as GOFF 0x0000786b (object 4), gateway_messages::sp_to_mgs::SpiError as GOFF 0x00010532 (object 4)

I'd also like to add a CI pass for detecting these by ensuring that humility hiffy -l doesn't return any stderr messages on the archive. However, there's an unrelated warning from that command

humility: WARNING: couldn't find type (Result<f32, NoData>, u64) for Sensor.get_raw_reading
humility: WARNING: couldn't find type (NoData, u64) for Sensor.get_last_nodata

which I haven't fixed yet. We could maybe pipe its stdout into grep "matches more than one enum" though.

This fixes a collision between `task_net_api::{SendError, RecvError}`
and the `smoltcp::{SendError, RecvError}` types that confuses Humility,
as in:

```console
humility: WARNING: RecvError matches more than one enum: task_net_api::RecvError as GOFF 0x00027769 (object 2), smoltcp::socket::udp::RecvError as GOFF 0x0004f824 (object 2)
humility: WARNING: SendError matches more than one enum: smoltcp::socket::udp::SendError as GOFF 0x0000f7d3 (object 2), task_net_api::SendError as GOFF 0x0002778d (object 2)
```
This fixes a collision between the `drv_spi_api::SpiError` and
`gateway_messages::sp_to_mgs::SpiError` types that confuses Humility, as
in:

```console
humility: WARNING: SpiError matches more than one enum: drv_spi_api::SpiError as GOFF 0x0000786b (object 4), gateway_messages::sp_to_mgs::SpiError as GOFF 0x00010532 (object 4)
humility: WARNING: SpiError matches more than one enum: drv_spi_api::SpiError as GOFF 0x0000786b (object 4), gateway_messages::sp_to_mgs::SpiError as GOFF 0x00010532 (object 4)
humility: WARNING: SpiError matches more than one enum: drv_spi_api::SpiError as GOFF 0x0000786b (object 4), gateway_messages::sp_to_mgs::SpiError as GOFF 0x00010532 (object 4)
humility: WARNING: SpiError matches more than one enum: drv_spi_api::SpiError as GOFF 0x0000786b (object 4), gateway_messages::sp_to_mgs::SpiError as GOFF 0x00010532 (object 4)
humility: WARNING: SpiError matches more than one enum: drv_spi_api::SpiError as GOFF 0x0000786b (object 4), gateway_messages::sp_to_mgs::SpiError as GOFF 0x00010532 (object 4)
```
@hawkw hawkw enabled auto-merge (squash) March 29, 2024 16:16
@hawkw hawkw merged commit ad28904 into master Mar 29, 2024
103 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants