-
Notifications
You must be signed in to change notification settings - Fork 372
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
Replace Bash ~and Python~ scripts with Rust #3349
Comments
I feel Bash and Python scripts don't deserve the same treatment. Bash scripts are a plague on Windows, but the same is not true for Python, in the context of a project that otherwise heavily relies on a working Python install. I, for one, feel like I'm leagues away from being as quick to improve on, e.g., |
True, but python still requires a separate |
I'd argue our ubiquitous use of [project.optional-dependencies]
tests = ["pytest==7.1.2"] # we somehow have this here already, not sure we actually use it
dev = [
# .... put everything we need
]
docs = [
# ... if we feel necessary, we can sub-categorise
] Then, The disadvantage is that these "extra" are published/visible to pypi. Poetry includes another mechanism (optional groups) that would be a better fit. |
The point I was trying to make is that we are primarily a Rust shop. To work on e.g. the Rerun viewer, you should ideally need only to install Rust, and that's it. Anything beyond that are extra steps that we should try to avoid, including installing Python, pip, and any pip requirements. Ideally you should only need to install Python if you are working on the Python SDK. |
I'm not totally on-board with that. Rust users should The build system needs to strike a balance between up-front setup for contributor vs. constraints on its day-to-day maintenance/development. My position is that banning Python from the build system would shift that balance to a level that would overall be detrimental to the dev experience. This is obviously a somewhat subjective topic. Maybe less so is the question of being a contributor without the ability to run the Python test suite. |
We (well, @jprochazk) have started porting more and more
So, I think we should consider an xtask-esque approach, where a single Rust binary multiplexes out into different Rust "scripts", so that each script is just a file added to the same crate. I've opened an issue for this: |
all subtasks done now! |
We have a bunch of Python scripts in our repository for CI stuff, linting, etc.
We would like to replace them all with Rust, perhaps using something like
xtask
.Some things we need to make sure of:
Cargo.toml
per script).See e.g. eRFC: single-file packages ("cargo script") integration rust-lang/rfcs#3424clap
)Related issues:
setup_web.sh
with something more robust #2174If we replace
lint.py
with Rust, we should consider usingast_grep_core
of https://github.com/ast-grep/ast-grepThe text was updated successfully, but these errors were encountered: