unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 45012@debbugs.gnu.org
Subject: bug#45012: 27.1.50; Emacs 27.1 release archive missing emacs-module.h
Date: Sat, 12 Dec 2020 15:55:46 +0100	[thread overview]
Message-ID: <CAArVCkRxaZE2M6MZGkp3woQLoB+Q5KnT-aD=p=Jqkg-wGK5f2Q@mail.gmail.com> (raw)
In-Reply-To: <83k0tuagvh.fsf@gnu.org>

Am So., 6. Dez. 2020 um 20:12 Uhr schrieb Eli Zaretskii <eliz@gnu.org>:
>
> > From: Philipp Stephani <p.stephani2@gmail.com>
> > Date: Sun, 6 Dec 2020 18:13:30 +0100
> > Cc: 45012@debbugs.gnu.org
> >
> > > I'm making a step back and asking why you thought it was a problem
> > > that emacs-module.h was not part of the release tarball.  It gets
> > > built as part of Emacs, so once Emacs is built, the header is
> > > available.  So why do you want it to be in the tarball?
> >
> > Concretely, I'm using emacs-module.h for my Go bindings to the module
> > API (https://godoc.org/github.com/phst/emacs). The compilation of the
> > library naturally requires emacs-module.h, but not Emacs.
>
> So you will build the module, but never test it or use it?  Is that a
> reasonably practical use case?

It depends what "you" is. "You" could be a continuous build system
that's capable of compiling C code, but not of running Emacs. That's
not far-fetched; compiling C code is far more common than running
Emacs, and therefore is better supported by build systems.
Or, the tests for the module aren't written in ELisp. It's entirely
reasonable to write the tests in the language that the module is
written in, and e.g. mock out the emacs_env object.
Or: the module provides only trivial wrappers around existing complex
functions, and those implementation functions have tests written in
another language.

>
> > Somewhat more abstractly, Emacs modules are independent from Emacs,
> > and Emacs isn't needed (and shouldn't be needed) to build them.
>
> If you just build a module and never use it, perhaps.  Once you want
> to use it, you need Emacs.

See above, "you" can be non-human users that can't or don't need to
use Emacs in any meaningful way.

>
> > Moreover, the build process for Emacs is rather involved, requiring
> > multiple steps lots of external binaries such as the GNU Autotools,
> > etc., while building a module only requires a C compiler (or compiler
> > for whatever language the module is written in) and a linker that
> > produces shared objects.
>
> Most people nowadays don't build their Emacs, they get it from a
> distribution.  That distribution will (or should) provide
> emacs-module.h as well.

That only works for non-hermetic builds. Hermetic builds (such as the
Bazel builds in my example) need to ship all dependencies and can't
rely on local distributions. CI/CD systems also tend to not have a
full GNU/Linux distribution with Linux installed, or they run builds
in a sandbox that doesn't allow access to local files (for hermeticity
or security), or similar.

>
> So I'm still not sure we have a good reason to revert the decision we
> made for Emacs 27 regarding emacs-module.h exclusion.

Quoting the commit message, the only reason given for not including
emacs-module.h is "it's too much hassle", without any explanation what
this "hassle" consists in and why it is "too much". (The release
tarball also includes .elc files, and those are a much bigger hassle
to build.) Rather, this decision shifts the hassle to the users.





  reply	other threads:[~2020-12-12 14:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02 17:52 bug#45012: 27.1.50; Emacs 27.1 release archive missing emacs-module.h Philipp Stephani
2020-12-02 18:10 ` Eli Zaretskii
2020-12-02 18:11   ` Philipp Stephani
2020-12-02 18:33     ` Eli Zaretskii
2020-12-02 18:47       ` Philipp Stephani
2020-12-02 18:53         ` Eli Zaretskii
2020-12-06 17:13           ` Philipp Stephani
2020-12-06 19:12             ` Eli Zaretskii
2020-12-12 14:55               ` Philipp Stephani [this message]
2020-12-12 18:37                 ` Eli Zaretskii
2021-01-24 19:01                   ` Philipp Stephani
2020-12-12 18:57                 ` Eli Zaretskii
2021-01-24 19:02                   ` Philipp Stephani
2021-10-11 12:36     ` Stefan Kangas
2021-10-11 15:32       ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAArVCkRxaZE2M6MZGkp3woQLoB+Q5KnT-aD=p=Jqkg-wGK5f2Q@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=45012@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).