Skip to content

disable jemalloc on android#18033

Merged
MichaReiser merged 2 commits intomainfrom
micha/disable-jemalloc-android
May 12, 2025
Merged

disable jemalloc on android#18033
MichaReiser merged 2 commits intomainfrom
micha/disable-jemalloc-android

Conversation

@MichaReiser
Copy link
Member

Summary

The android ndk no longer ships with gcc by default, but jemalloc requires it.
There are some tricks that allow building jemalloc without gcc but this feels unnecessarily complicated.

For now, let's disable jemalloc.

Fixes #18016
Related #17527

Test Plan

I don't have an android device.

@MichaReiser MichaReiser added the cli Related to the command-line interface label May 12, 2025
@MichaReiser
Copy link
Member Author

@ZeusKC52 could you try if this version works fine for you on android?

@MichaReiser MichaReiser requested review from ntBre and removed request for AlexWaygood, carljm, dcreager and sharkdp May 12, 2025 07:21
@github-actions
Copy link
Contributor

mypy_primer results

No ecosystem changes detected ✅

@ZeusKC52
Copy link

How do i run this on termux?

@github-actions
Copy link
Contributor

github-actions bot commented May 12, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser
Copy link
Member Author

How do i run this on termux?

Not sure, I never used termux.

YOu can clone this repository and then run cargo build --bin ruff. But I don't know how involved that is.

The alternative is we land this PR and you wait for the next release to test it out and you report back in case it doesn't work.

@ZeusKC52
Copy link

How do i clone this pull request? I looked on the internet but nothing seems to work.

Copy link
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this makes sense to me!

// Use `writeln` instead of `eprintln` to avoid panicking when the stderr pipe is broken.
let mut stderr = io::stderr().lock();

//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it might be unrelated

@ntBre
Copy link
Contributor

ntBre commented May 12, 2025

How do i clone this pull request? I looked on the internet but nothing seems to work.

You can run git clone with the -b flag (short for --branch):

git clone -b micha/disable-jemalloc-android https://github.com/astral-sh/ruff --depth 1

I also threw in --depth 1 to avoid pulling down the whole history if you just want to test this once.

I have a couple of old android devices I can possibly try to charge if needed too.

@MichaReiser
Copy link
Member Author

Let's test this with the next release.

@MichaReiser MichaReiser merged commit 797eb70 into main May 12, 2025
33 checks passed
@MichaReiser MichaReiser deleted the micha/disable-jemalloc-android branch May 12, 2025 12:41
@ZeusKC52
Copy link

Tried and it gave me this:

$ git clone -b micha/disable-jemalloc-android https://github.com/astral-sh/ruff --depth 1
fatal: destination path 'ruff' already exists and is not an empty directory.

What now?

@ntBre
Copy link
Contributor

ntBre commented May 12, 2025

The branch has now been merged into the main branch, so you can just go into the ruff directory and run the command Micha mentioned above, after pulling the new changes:

cd ruff
git pull
cargo build --bin ruff

Or you can wait for the next release later this week!

dcreager added a commit that referenced this pull request May 12, 2025
* main:
  disable jemalloc on android (#18033)
  [ty] Fix incorrect type of `src.root` in documentation (#18040)
  [ty] Refine message for why a rule is enabled (#18038)
  [ty] Remove brackets around option names (#18037)
  Update pre-commit dependencies (#18025)
  Update docker/build-push-action action to v6.16.0 (#18030)
  Update docker/login-action action to v3.4.0 (#18031)
  Update taiki-e/install-action digest to 83254c5 (#18022)
  Update cargo-bins/cargo-binstall action to v1.12.4 (#18023)
  Update Rust crate ctrlc to v3.4.7 (#18027)
  Update Rust crate clap to v4.5.38 (#18026)
  Update Rust crate jiff to v0.2.13 (#18029)
  Update Rust crate getrandom to v0.3.3 (#18028)
  Update dependency ruff to v0.11.9 (#18024)
  [`pylint`] add fix safety section (`PLW1514`) (#17932)
  python_stdlib: update for 3.14 (#18014)
  [`ruff`] add fix safety section (`RUF033`) (#17760)
  [`pylint`] add fix safety section (`PLC0414`) (#17802)
Glyphack pushed a commit to Glyphack/ruff that referenced this pull request May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Related to the command-line interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to fix ERROR: Failed to build installable wheels for some pyproject.toml based projects (ruff)?

3 participants