sapling/edenscm/hgext/extlib
Xavier Deguillard 90e4ab0d4e bindings: fold pyrevisionstore lib into the bindings lib
Summary:
After D15266191, the bindings crate directly depends on pyrevisionstore, and
since then we have seen really weird compilation errors that magically go away
when some files are touched.

From my observations, here is what I came up with. The pyrevisionstore crate is
both compiled as a dependency of the bindings crate, and as a library to be
used in python. Therefore, its Cargo.toml contains a '[lib]' section, the
presence of this section forces the crate to be compiled into a
"libpyrevisionstore.{rlib,so}", while all the regular crates have a hashed
suffix like "libedenapi-2b9975ec9b865e87.rlib".

None of this would usually matter, but our build system re-uses the build
directory to then compile the pyrevisionstore library. While doing so, it will
re-create the "libpyrevisionstore.{rlib,so}", but not in an identical fashion.
After this, the rest of the build succeeds.

Once a file in the bindings crate is touched, recompiling will only recompile
its file, and not the pyrevisionstore crate, but since
"libpyrevisionstore.{rlib,so}" is different, it now fails to compile...

A previous effort tried to compile each top level target into a separate
directory, but that directly affected some of our tests. Since the underlying
issue is that pyrevisionstore is compiled twice, let's simply not compile it as
a top-level target and simply fold it into the bindings lib. Ideally, we would
want to do the opposite, but let's do that at a later time.

Reviewed By: DurhamG

Differential Revision: D15381038

fbshipit-source-id: 047cfab794371464942f19084ffb9240e836cb40
2019-05-17 08:20:53 -07:00
..
cfastmanifest codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
cstore fix double free in cdatapack 2019-04-03 21:13:13 -07:00
ctreemanifest codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
indexes radixbuf: replace error-chain with failure 2019-04-29 15:36:02 -07:00
phabricator ignnore draft versions if there's newer attached version 2019-04-29 03:03:18 -07:00
pyrevisionstore bindings: fold pyrevisionstore lib into the bindings lib 2019-05-17 08:20:53 -07:00
pywatchman watchman: canonicalize repo root before querying watchman 2019-02-04 10:34:08 -08:00
watchmanclient blackbox: clean up blackbox logging and log more during rage 2019-04-23 02:48:50 -07:00
__init__.py codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
Cargo.toml extlib: add cargo workspace 2019-03-20 19:56:14 -07:00
cfastmanifest.c codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
linelog.pyx codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
litemmap.pyx codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
mysqlutil.py codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
README.md codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
traceprofimpl.cpp codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00

extlib

Code that extensions depend on, but aren't themselves extensions, should go here. Both native (C/C++/Cython/Rust) and Python code is allowed. Code that depends on Python is also allowed.

In theory, this code should slowly disappear as extension code gets folded into mainline Mercurial. (The native bits should go into lib/ or mercurial/cext), the Python code into mercurial/ itself.)

See also lib/README.md, mercurial/cext/README.md.