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

fix pyo3 build thrashing cross-IDE #2933

Open
andrewgazelka opened this issue Sep 25, 2024 · 2 comments
Open

fix pyo3 build thrashing cross-IDE #2933

andrewgazelka opened this issue Sep 25, 2024 · 2 comments

Comments

@andrewgazelka
Copy link
Contributor

or at least let's figure out how we can get pyo3 to stop recompiling all
the time when I am using JetBrains. How did we fix this for VSC?

looks lke we did

/~https://github.com/Eventual-Inc/Daft/blob/main/.vscode/settings.json#L3

however I am confused about details about how this works and if IntelliJ
is what is causing things to recompile for me

@universalmind303
Copy link
Contributor

for the pyo3 build thrashing, the recommended approach is actually to set the env var PYO3_PYTHON to a hardcoded path. PyO3/pyo3#1708

The vscode settings help with this in a different way, it sets rust-analyzer to use it's own build directory instead of sharing it with ./target, but it solves the same problem as pyo3 is always built with the same env vars

I'm not a jetbrains user, but I'm sure there's likely a way to set their analyzer to use a custom path. Set it to something like ./target/analyzer and that'd be the equivalent of the vscode settings

I personally prefer keeping IDE specific settings out of the core repo, and instead add it to a contributors guide.

@andrewgazelka
Copy link
Contributor Author

andrewgazelka commented Sep 26, 2024

perhaps we can set .cargo/config.toml? https://www.perplexity.ai/search/pyo3-python-fix-pyo3-recompile-.8_iGSsmQravJ671YMe5Og#0 just made mine

[env]
PYO3_PYTHON = "./.venv/bin/python"

seems to fix

@andrewgazelka andrewgazelka changed the title add .idea settings perhaps? fix pyo3 build thrashing cross-IDE Sep 26, 2024
andrewgazelka added a commit that referenced this issue Sep 26, 2024
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 a pull request may close this issue.

2 participants