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

aya: remove unwrap/expect and NonZero* in info #1021

Merged
merged 1 commit into from
Sep 8, 2024

Conversation

tyrone-wu
Copy link
Contributor

@tyrone-wu tyrone-wu commented Sep 6, 2024

Addresses the feedback from #1007: 🙃

  • Remove panic from unwrap and expect
  • Option<NonZero*> => Option<int> with 0 mapping to None
    - Use aya_ebpf::binding in u32 conversion in prog, link, and attach type for more straightforward matching. The ::Type appears to be an alias for u32, so cast wasn't required. see comment

Copy link

netlify bot commented Sep 6, 2024

Deploy Preview for aya-rs-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 94aff3a
🔍 Latest deploy log https://app.netlify.com/sites/aya-rs-docs/deploys/66db63a882e35b000801526e
😎 Deploy Preview https://deploy-preview-1021--aya-rs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

mergify bot commented Sep 6, 2024

Hey @alessandrod, this pull request changes the Aya Public API and requires your review.

@mergify mergify bot added the api/needs-review Makes an API change that needs review label Sep 6, 2024
@mergify mergify bot requested a review from alessandrod September 6, 2024 18:20
@mergify mergify bot added aya This is about aya (userspace) aya-log Relating to aya-log aya-obj Relating to the aya-obj crate test A PR that improves test cases or CI labels Sep 6, 2024
@tyrone-wu
Copy link
Contributor Author

tyrone-wu commented Sep 6, 2024

@marysaka
Oddly, adding aya-ebpf dependency to aya-obj causes build CI for armv7 and integration-tests for Ubuntu to produce some weird errors.

When aya-ebpf is present in aya-obj Cargo.toml, even though it is not being used in the crate.

And this is with the dependency removed.

@marysaka
Copy link
Member

marysaka commented Sep 6, 2024

@marysaka Oddly, adding aya-ebpf dependency to aya-obj causes build CI for armv7 and integration-tests for Ubuntu to produce some weird errors.

When aya-ebpf is present in aya-obj Cargo.toml, even though it is not being used in the crate.

* workflow - https://github.com/tyrone-wu/aya/actions/runs/10744225344

* sause - [tyrone-wu@90f0481](https://github.com/tyrone-wu/aya/commit/90f0481acde3f8bbcfd0860cc371f257550891c2)

And this is with the dependency removed.

* workflow: https://github.com/tyrone-wu/aya/actions/runs/10743997333

* sause: [tyrone-wu@17b41ab](https://github.com/tyrone-wu/aya/commit/17b41ab83d9b5c94bd20f84190a4a875689f5850)

Seems that I misunderstood the origin of that type and got confused sorry about that, can you revert those changes then? 😞

Addresses the feedback from aya-rs#1007:
- remove panic from `unwrap` and `expect`
- Option<NonZero*> => Option<int> with `0` mapping to `None`

Refs: aya-rs#1007
@vadorovsky vadorovsky merged commit 02d1db5 into aya-rs:main Sep 8, 2024
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api/needs-review Makes an API change that needs review aya This is about aya (userspace) aya-log Relating to aya-log aya-obj Relating to the aya-obj crate test A PR that improves test cases or CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants