Polkadot-Blockchain-Academy / pba-content

An intensive academic program teaching Blockchain, Substrate, and Polkadot.
https://polkadot-blockchain-academy.github.io/pba-content/
MIT License
57 stars 27 forks source link

how to get builds reusing full artifacts on kernel restart (not just sccashe) #84

Closed nuke-web3 closed 1 year ago

nuke-web3 commented 2 years ago

as much as possible, reuse all build work without omtroducing jupyter issues related to it (maybe) needing some things reset between each run.

JoshOrndorff commented 2 years ago

Is this issue about jupyter only? Or is it bigger about all rust builds

nuke-web3 commented 2 years ago

Mostly jupyter - as every kernel restasrt uses a new /tmp/<random>target

https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-reads

CARGO_TARGET_DIR — Location of where to place all generated artifacts, relative to the current working directory. See build.target-dir to set via config.

Mentioned in this great steam https://www.youtube.com/watch?v=pMiqRM5ooNw

nuke-web3 commented 2 years ago

https://github.com/google/evcxr/issues/231 opened to ask formally

nuke-web3 commented 2 years ago

Answer

If you set EVCXR_TMPDIR, then evcxr will just use that one directory. If you have multiple kernels running, then you should make sure they have separate directories.