unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: ian martins <ianxm@jhu.edu>
Cc: emacs-devel@gnu.org
Subject: Re: [ELPA] New package: ob-haxe
Date: Tue, 19 Jan 2021 10:15:39 -0500	[thread overview]
Message-ID: <jwvft2xatcf.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAC=rjb7Z4V=5QG_6gmdFGnuPodvwZ51OkBOOp7WJdTBaQO66JQ@mail.gmail.com> (ian martins's message of "Tue, 19 Jan 2021 09:28:32 -0500")

>> it's impractical for
>> flymake/flycheck/company/org-babel/... to come with support for all
>> languages, but it's also inconvenient for the user to have to install
>>
>>     FOO
>>     ob-FOO
>>     company-FOO
>>     flymake-FOO
>>     younameit-FOO
>>
>> before Emacs provides adequate support for the language FOO.  So as much
>> as possible, I think it makes sense to include those things along with
>> the language's major mode.
>
> This makes sense to me, but I don't see why the solution has to be to
> combine them all into a single package.
>
> If putting everything related to flymake doesn't work, couldn't the
> same problems arise if we clump together everything related to
> a language?

In theory, yes.

> It's the same solution (partitioning functionality into packages based
> on relatedness), but now we're slicing it on a different axis
> [language] than before [feature].

Indeed.  In practice it tends to work much better, but there's no
guarantee: one size never fits all.

> I may be missing the main issue, but suspect the problem with keeping
> all languages in flymake is that users don't want to install flymake
> implementations for languages they don't use and maintainers don't
> want to maintain code they aren't familiar with.

Not only that.  Typically, the code that provides flymake support for
a given language will need to know something about that language and
some of that info is also needed in the major-mode (e.g. the name of the
compiler), so the two will usually want to share some
defconst/defcustom, but you can't have flymake *depend* on all those
major modes, so you typically end up with duplication.

> Both of these problems would apply to major modes that include
> everything related to that language.

I think part of the reason why the tradeoffs are different is that the
number of "infrastructure" packages (font-lock, imenu, flymake, company,
eglot, org-babel, smie, ...) tends to be much smaller and grow much less
frequently than the number of languages.

> Another option is to have small packages with specific functions, and
> use dependencies to build up larger chunks of functionality.

Of course.

> Would it solve the problem if we had a haxe-bundle package with
> dependencies on haxe-mode and ob-haxe?

I don't think there's really a problem to solve, really.

> Then users only have to find one package to install all haxe
> functionality if they want it, but if they don't want it all they can
> pick individual packages instead.

If there is an actual choice for the user, that's good.  But if the
choice is only "include org-babel support or not" then I think this is
actually detrimental for the user: the gain of not having org-babel
support for those users not using org-babel *should* be negligible
(i.e. it should not incur extra dependencies and the increase in size
should be irrelevant).

> Also that way all of the code is maintained by those who know it best.
> Also, parent packages can be created today to encompass existing
> languages relatively easily, but merging all of the existing packages
> for each language together into major modes would be a large effort
> and significant disruption to those projects.

Nobody is forcing them to be merged.  I'm just saying that history tells
us that they tend to merge that way, and that it's usually a good thing
both for the users and for technical reasons.  So we may as well
consciously move in that direction whenever convenient.

>> Good question.  As a general rule "more than one package to choose from
>> for a language's major mode" is itself a problem (especially because
>> more often than not, it means none of the options are really maintained
>> and the choice is really between different sets of shortcomings).
> I'm not sure about this rule.

I am.

> How can we know that two competing packages won't be maintained?

We don't (and nowhere did I say that we do).

>> So, IIUC you're saying that there is no main `haxe-mode` anyway into
>> which we could integrate `ob-haxe`?  If so, and since Org doesn't want
>> it, we should add it as a separate package, indeed.
> No, sorry, I was asking hypothetically.  Actually I think there were
> multiple haxe major modes at one point but I checked yesterday and saw
> only one (there are a couple other haxe packages, but just one major
> mode).

Good.  Then I think it would be good to try and work with the
major-mode's maintainer and merge the two packages.

In the mean time, I'll do the initial addition of `ob-haxe` to GNU ELPA.


        Stefan




  reply	other threads:[~2021-01-19 15:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-16 12:48 [ELPA] New package: ob-haxe ian martins
2021-01-17 22:41 ` Stefan Monnier
2021-01-18  3:35   ` ian martins
2021-01-18 16:31     ` Stefan Monnier
2021-01-19  5:30       ` Richard Stallman
2021-01-19 14:19         ` Stefan Monnier
2021-01-19 14:28       ` ian martins
2021-01-19 15:15         ` Stefan Monnier [this message]
2021-01-20  3:25           ` ian martins
2021-01-20  4:01             ` Stefan Monnier
2021-01-18  6:27   ` ASSI
2021-01-18 16:32     ` Stefan Monnier

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=jwvft2xatcf.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=ianxm@jhu.edu \
    /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).