How to get back to a one-file `hg` executable?

Gregory Szorc gregory.szorc at gmail.com
Tue Nov 3 04:06:43 UTC 2020


I'm unsure what's going on here.

For this to occur, `.resources_location_fallback = None` must hold on the
policy instance and some resource being added must have its `.add_location
= "filesystem-relative:..."`.

This error message is horrible. And I just committed a change to the `main`
branch to print more context about which exact resource is failing. If you
don't want to run the latest commit from `main`, you can change this to
something like:

for resource in exe.pip_install["--verbose", ROOT]):
    print("adding %s" % resource)
    exe.add_python_resource(resource)

Or you could look for references to "filesystem-relative" in the
configuration file. There's likely something setting that as the
`.add_location =` value.

FWIW I _think_ Martin did all the necessary work to enable Mercurial to be
shipped as a standalone binary? I left it out of the in-tree config because
files mode was backwards compatible and safer. But a single file binary is
something we could implement next release.

On Mon, Nov 2, 2020 at 11:06 AM Augie Fackler <augie at google.com> wrote:

> Hi Greg!
>
> I'm working on updating hg and trying to switch us to pyoxidizer for
> Windows, but a speedbump on the way is that our Mac builds have broken:
> we'd been relying on the one-file build mode of the binary, and now that
> appears to be impossible? Am I missing something? I tried editing the
> pyoxidizer.bzl to make all resources be "in-memory" but then I get a
> failure trying to add the hg packages, eg:
>
> error[PYOXIDIZER_BUILD]: resource collector does not allow resources in
> filesystem-relative
>   --> ./pyoxidizer.bzl:64:5
>    |
> 64 |     exe.add_python_resources(exe.pip_install(["--verbose", ROOT]))
>    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> add_python_resources()
>
> which left me stumped. Am I missing something obvious in the docs or
> configuration that would let us get back to one-file executables for our
> macOS users?
>
> Thanks,
> Augie
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20201102/7978a5ad/attachment-0002.html>


More information about the Mercurial-devel mailing list