Skip to content

Conversation

joshuarli
Copy link
Member

@joshuarli joshuarli commented Aug 21, 2025

This introduces devenv, uv and pre-commit in accordance with these repo standards:
https://www.notion.so/sentry/Standard-Spec-devenv-2238b10e4b5d8072a992d8b67d94be22
https://www.notion.so/sentry/Standard-Spec-python-uv-2248b10e4b5d8045b8fff30f8b8b67ca
https://www.notion.so/sentry/Standard-Spec-pre-commit-2238b10e4b5d8019aa1fe1158e39c38e

The ability to run devenv sync and get a dev environment in any repo is the DX i'm aiming for,
and these standards provide a foundation from which later we can easily push updates to all repos.

You should be able to checkout this branch, run direnv allow and devenv sync (might be prompted to run ~/.local/share/sentry-devenv/bin/devenv update first), which will set up everything needed for development (other than cargo).

Notes:

  • I was also able to add rustfmt as a local pre-commit hook (need to keep the rust edition in sync with cargo.toml it seems) but it seems like clippy doesn't work on individual files (perhaps clippy-driver?) - anyway, decided not to touch these parts for now to keep things simple.

@joshuarli joshuarli force-pushed the feat-devenv-pre-commit-devservices branch from 01cba11 to 503daa7 Compare August 21, 2025 20:46
@joshuarli joshuarli mentioned this pull request Aug 21, 2025
@joshuarli joshuarli marked this pull request as ready for review August 21, 2025 21:45
@joshuarli joshuarli requested a review from a team as a code owner August 21, 2025 21:45
@loewenheim
Copy link
Contributor

I honestly question the utility of clippy being a pre-commit hook. I don't think it's helpful to require all individual commits to be correctly linted, and you can't merge without it anyway.

@joshuarli
Copy link
Member Author

I honestly question the utility of clippy being a pre-commit hook. I don't think it's helpful to require all individual commits to be correctly linted, and you can't merge without it anyway.

Yeah, I just realized clippy/clippy-driver is a wrapper around rustc - rust linting inherently requires compilation, making it too slow for pre-commit anyways.

joshuarli added a commit that referenced this pull request Sep 4, 2025
prerequisite to #1770

we need python >= 3.11 since that's what our internal pypi supports
(getsentry/pypi#1610)
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