little-bear-labs / ipfs-chromium

19 stars 1 forks source link

Base-16 support #46

Closed John-LittleBearLabs closed 1 year ago

John-LittleBearLabs commented 1 year ago

Fixes #45

Also, changed how unsupported multibases are reported. No more asserting/crashing.

Simply not crashing, though, causes it to repoint to about:blank#blocked which is just a blank page so the only clue you have as to what went wrong is the confusing & misleading location bar text.

I have access to limited error reporting when canonicalizing URLs, so I decided to "successfully" canonicalize it into an identity CID ipfs:// URL (conceptually similar to a data:// URL) that points to an error message. image

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 57.14% and project coverage change: +0.95% :tada:

Comparison is base (479894a) 52.45% compared to head (7e4b466) 53.40%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #46 +/- ## ========================================== + Coverage 52.45% 53.40% +0.95% ========================================== Files 48 50 +2 Lines 2381 2479 +98 ========================================== + Hits 1249 1324 +75 - Misses 1132 1155 +23 ``` | [Files Changed](https://app.codecov.io/gh/little-bear-labs/ipfs-chromium/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=little-bear-labs) | Coverage Δ | | |---|---|---| | [library/src/libp2p/crypto/hasher.cc](https://app.codecov.io/gh/little-bear-labs/ipfs-chromium/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=little-bear-labs#diff-bGlicmFyeS9zcmMvbGlicDJwL2NyeXB0by9oYXNoZXIuY2M=) | `57.14% <ø> (ø)` | | | [.../src/libp2p/multi/multibase\_codec/codecs/base16.cc](https://app.codecov.io/gh/little-bear-labs/ipfs-chromium/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=little-bear-labs#diff-bGlicmFyeS9zcmMvbGlicDJwL211bHRpL211bHRpYmFzZV9jb2RlYy9jb2RlY3MvYmFzZTE2LmNj) | `43.03% <43.03%> (ø)` | | | [...brary/src/libp2p/multi/content\_identifier\_codec.cc](https://app.codecov.io/gh/little-bear-labs/ipfs-chromium/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=little-bear-labs#diff-bGlicmFyeS9zcmMvbGlicDJwL211bHRpL2NvbnRlbnRfaWRlbnRpZmllcl9jb2RlYy5jYw==) | `46.91% <46.66%> (+3.04%)` | :arrow_up: | | [library/src/ipfs\_client/identity\_cid.cc](https://app.codecov.io/gh/little-bear-labs/ipfs-chromium/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=little-bear-labs#diff-bGlicmFyeS9zcmMvaXBmc19jbGllbnQvaWRlbnRpdHlfY2lkLmNj) | `66.66% <66.66%> (ø)` | | | [library/src/ipfs\_client/block\_storage.cc](https://app.codecov.io/gh/little-bear-labs/ipfs-chromium/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=little-bear-labs#diff-bGlicmFyeS9zcmMvaXBmc19jbGllbnQvYmxvY2tfc3RvcmFnZS5jYw==) | `57.14% <100.00%> (+0.85%)` | :arrow_up: | | [library/src/ipfs\_client/dag\_block.cc](https://app.codecov.io/gh/little-bear-labs/ipfs-chromium/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=little-bear-labs#diff-bGlicmFyeS9zcmMvaXBmc19jbGllbnQvZGFnX2Jsb2NrLmNj) | `57.34% <100.00%> (+0.91%)` | :arrow_up: | | [library/src/ipfs\_client/gateways.cc](https://app.codecov.io/gh/little-bear-labs/ipfs-chromium/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=little-bear-labs#diff-bGlicmFyeS9zcmMvaXBmc19jbGllbnQvZ2F0ZXdheXMuY2M=) | `46.42% <100.00%> (ø)` | | | [...bp2p/multi/multibase\_codec/multibase\_codec\_impl.cc](https://app.codecov.io/gh/little-bear-labs/ipfs-chromium/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=little-bear-labs#diff-bGlicmFyeS9zcmMvbGlicDJwL211bHRpL211bHRpYmFzZV9jb2RlYy9tdWx0aWJhc2VfY29kZWNfaW1wbC5jYw==) | `52.27% <100.00%> (+13.49%)` | :arrow_up: | ... and [9 files with indirect coverage changes](https://app.codecov.io/gh/little-bear-labs/ipfs-chromium/pull/46/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=little-bear-labs)

:umbrella: View full report in Codecov by Sentry.

:loudspeaker: Have feedback on the report? Share it here.