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

Remove lazy-static dependency #308

Merged
merged 1 commit into from
May 6, 2024
Merged

Conversation

notgull
Copy link
Contributor

@notgull notgull commented Apr 30, 2024

lazy-static is on its way to being deprecated. I'm trying to remove it
from my dependency tree. Therefore I've removed lazy-static from this
crate in this commit.

Modifications made:

  • PAGESIZE and TICKS_PER_SECOND appear to be unused so I've removed
    them.
  • KERNEL can be replaced with racy atomic initialization.
  • RANDOM_ROOT doesn't really need to be allocated on the heap, so I've
    replaced it with manual Path::new.

lazy-static is on its way to being deprecated. I'm trying to remove it
from my dependency tree. Therefore I've removed lazy-static from this
crate in this commit.

Modifications made:

- PAGESIZE and TICKS_PER_SECOND appear to be unused so I've removed
  them.
- KERNEL can be replaced with racy atomic initialization.
- RANDOM_ROOT doesn't really need to be allocated on the heap, so I've
  replaced it with manual Path::new.

Signed-off-by: John Nunley <dev@notgull.net>
@eminence
Copy link
Owner

Thanks, on quick skim this looks good, will review more carefully later

@notgull
Copy link
Contributor Author

notgull commented May 5, 2024

@eminence Have you had a chance to review this more carefully?

@eminence
Copy link
Owner

eminence commented May 6, 2024

LGTM, thanks!

@eminence eminence merged commit a8fab66 into eminence:master May 6, 2024
6 checks passed
@eminence
Copy link
Owner

eminence commented May 6, 2024

I'm trying to remove it from my dependency tree.

I'm always curious to know where/how procfs is used, so if you're comfortable sharing, where is procfs being used in your deptree?

@notgull notgull deleted the no-lazy branch May 16, 2024 01:00
@notgull
Copy link
Contributor Author

notgull commented May 16, 2024

I'm always curious to know where/how procfs is used, so if you're comfortable sharing, where is procfs being used in your deptree?

I was taking bpftop for a spin when I realized that procfs was pulling in lazy-static in its dependency tree.

@notgull
Copy link
Contributor Author

notgull commented Sep 27, 2024

@eminence Are you planning on making a release with this change?

@eminence
Copy link
Owner

Let me try to get a release out in a day or so

@eminence
Copy link
Owner

eminence commented Oct 7, 2024

This is now published at 0.17.0

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.

2 participants