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

Fixup Dependencies #4

Merged
merged 1 commit into from
Mar 18, 2024
Merged

Fixup Dependencies #4

merged 1 commit into from
Mar 18, 2024

Conversation

davisp
Copy link
Collaborator

@davisp davisp commented Mar 18, 2024

Both tempdir and lazy_static should be in the [dev-dependencies] section so that we're not forcing them on downstream users. Secondly I removed lazy_static in favor of creating a TempDir per test to avoid sharing global state in tests as well as error localization in the very unlikely situation core ever creates a non-writable file.

@davisp davisp requested a review from rroelke March 18, 2024 13:13
@davisp davisp force-pushed the pd/fixup-dependencies branch from 7289461 to aeac796 Compare March 18, 2024 13:14
While reading through changes the new dependencies for tempdir and
lazy_static caught my eye. The first bit was that these should be marked
as `dev-dependencies` so that we're not forcing them onto users of
`tiledb-rs` that don't need them.

I've also removed the lazy_static dependency for a couple reasons.
First, tests sharing global state should be a last resort which caught
my eye first. But then I also realized, there's actually a subtle test
we can add here per test. If core ever creates a non-writable file that
breaks directory removal, we wouldn't know which test it was using
lazy_static (as the error would happen at process exit). Creating a
TempDir per test means we'll automatically know which test caused the
issue (if it ever even happens).
@davisp davisp force-pushed the pd/fixup-dependencies branch from aeac796 to dc5c9b9 Compare March 18, 2024 13:43
@davisp davisp merged commit 2463e7a into main Mar 18, 2024
1 check passed
@davisp davisp deleted the pd/fixup-dependencies branch March 19, 2024 18:07
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