Commit Graph

5 Commits

Author SHA1 Message Date
Mark Thomas
75980fb243 build: vendor in Rust dependencies
Summary:
Rust dependencies are vendored in by downloading a package containing all Rust
dependencies.

The package can be updated using the new `vendorcrates.py` script.

Test Plan: Build using the vendored packages.

Reviewers: quark, #mercurial

Reviewed By: quark

Differential Revision: https://phabricator.intern.facebook.com/D6689642

Tasks: T24908724

Signature: 6689642:1515548647:8051ec3dadd98873f0312bb67978846ba029b558
2018-01-09 17:48:32 -08:00
Jun Wu
fb45633a19 distutils_rust: use atomic replace to install the .so file
Summary:
Python loads .so using mmap. Rewriting a .so in-place when there is a Python
process with that .so mmap-ed could crash that Python process. Therefore
let's avoid rewriting the destination .so in-place.

This was discovered by a txnclose Python hook I used to keep binaries
up-to-date. It caused segfault after building the Rust extensions currently
loaded by the Python process running the hook.

Test Plan: `hg push` triggering that txnclose hook won't crash on the remote.

Reviewers: durham, #sourcecontrol

Reviewed By: durham

Differential Revision: https://phabricator.intern.facebook.com/D6686739

Signature: 6686739:1515532516:24c0b7066ff15a39a7bd824e779569f4a886d7df
2018-01-09 13:05:51 -08:00
Phil Cohen
c0545cf009 build: fix issue if destdir is missing
Summary: Fixes an issue where the build would fail if the directory had not been made.

Test Plan: ./setup.py build works now

Reviewers: mbthomas, #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D6681061
2018-01-08 19:29:53 -08:00
Mark Thomas
c9db9d4c02 checks: fixup test-check-module-imports for rust changes
Summary:
Fix up test-check-module-imports, mostly by using absolute imports where
possible.

Also, some lfs errors have been removed, so remove their tests failures too.

Test Plan: Run test-check-module-imports test.

Reviewers: durham, #mercurial

Reviewed By: durham

Differential Revision: https://phabricator.intern.facebook.com/D6679241

Tasks: T24908724

Signature: 6679241:1515457419:2f8683206c8d43af99254c9f75f08af374673c2f
2018-01-08 17:01:31 -08:00
Mark Thomas
2e81565606 fb-hgext: integrate rust libraries and extensions with setup.py
Summary:
Move the rust libraries and extensions to their new locations, and integrate
them with the hg-crew setup.py.

Test Plan: Run `python setup.py build` and verify rust extensions are built.

Reviewers: durham, #mercurial

Reviewed By: durham

Subscribers: fried, jsgf, mitrandir

Differential Revision: https://phabricator.intern.facebook.com/D6677251

Tasks: T24908724

Signature: 6677251:1515450235:920faf40babbce9b09e3283ff9ca328d1c5c51e6
2018-01-08 15:26:24 -08:00