build-trust / ockam

Orchestrate end-to-end encryption, cryptographic identities, mutual authentication, and authorization policies between distributed applications – at massive scale.
https://ockam.io
Apache License 2.0
4.48k stars 562 forks source link

Adapt ockam_abac to new version of wast crate #5331

Closed mrinalwadhwa closed 1 year ago

mrinalwadhwa commented 1 year ago

This dependabot PR has failing tests: https://github.com/build-trust/ockam/pull/5312 https://github.com/build-trust/ockam/actions/runs/5536262663/jobs/10103686963?pr=5312

tomkarw commented 1 year ago

Hey @mrinalwadhwa, I'd be happy to solve this one.

SanjoDeundiak commented 1 year ago

All yours @tomkarw

tomkarw commented 1 year ago

There seems to be a problem with building the standalone sub-crates: https://docs.rs/crate/ockam_abac/latest. It looks it's been broken since 0.22.0.

If this isn't a known issue, I can work to fix it first before continuing with this PR.

I'm pretty sure I came across this issue in the past. When building the whole project, some features/optional dependencies are enabled by the root crate (let's call it A) in another sub-crate (let's call it B) which makes ocam_abac (let's call it C) work (which depends on B). However, when compiling the sub-crate as standalone, the optional dependencies (I think serde in this case) is missing, making B compile as dependency of A, but not C.

This also indicates your CI is missing checks for sub-crates as standalone components.

tomkarw commented 1 year ago

@SanjoDeundiak any update on this?

SanjoDeundiak commented 1 year ago

Hey @tomkarw , sorry for the late reply. I think your observation is right. We actually have an issue for that here https://github.com/build-trust/ockam/issues/5491. Please take it if you would like to work on it

metaclips commented 1 year ago

Fixed in https://github.com/build-trust/ockam/pull/5440