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 instant dependency when not building for web #157

Merged
merged 7 commits into from
Sep 4, 2023

Conversation

repi
Copy link
Contributor

@repi repi commented Jul 1, 2023

This dependency was introduced originally in #112.

It is a platform abstraction, but it is a tiny one and it is not harder to just use the std type which avoids always pulling in instant including for wasm32-unknown-unknown when not building for the web where it has no purpose at all.

Want to have as few dependencies as possible on core low level crates like puffin that almost all of our code depends on.

This dependency was introduced originally in #112.

It is a platform abstraction, but it is a tiny one and it is not harder to just use the std type which avoids always pulling in `instant` including for `wasm32-unknown-unknown` when not building for the web where it has no purpose at all.

Want to have as few dependencies as possible on core low level crates like `puffin` that almost all of our code depends on.
@repi repi requested review from emilk and TimonPost as code owners July 1, 2023 08:56
@emilk
Copy link
Collaborator

emilk commented Sep 4, 2023

We should also move away from using the instant crate to using web_time instead.
instant is unmaintained with unfixed bugs:

@emilk
Copy link
Collaborator

emilk commented Sep 4, 2023

Ah, I guess web-time needs vetting now

@repi
Copy link
Contributor Author

repi commented Sep 4, 2023

when one introduce a new dependency one need to run cargo vet regenerate exemptions which will see if there are imported audits that can cover it and if not will add it to the exemption list, which is fine for now as we don't need all dependencies fully audited (though eventually that would be nice).

puffin/src/lib.rs Show resolved Hide resolved
@emilk emilk merged commit fdbbada into main Sep 4, 2023
6 checks passed
@emilk emilk deleted the remove-instant-dependency branch September 4, 2023 12:44
plasticbox pushed a commit to alt9github/puffin that referenced this pull request Nov 9, 2023
)

This dependency was introduced originally in EmbarkStudios#112.

It is a platform abstraction, but it is a tiny one and it is not harder
to just use the std type which avoids always pulling in `instant`
including for `wasm32-unknown-unknown` when not building for the web
where it has no purpose at all.

Want to have as few dependencies as possible on core low level crates
like `puffin` that almost all of our code depends on.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
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