Subject: Developers of Sympa
List archive
- From: Luc Didry <address@concealed>
- To: address@concealed
- Subject: Re: [sympa-developpers] Use Carton for Sympa?
- Date: Fri, 25 May 2018 16:09:25 +0200
samedi 19 mai 2018, 16:15:58 CEST IKEDA Soji wrote:
> I think it's worth tacking.
>
> Sympa::ModDef includes information about all dependent modules.
> Though it is used only by "sympa_wizard.pl --check" by now,
> it is possible to generate cpanfile using it.
>
> In fact, in the past source distribution of Sympa contained
> META.json file generated from Sympa::ModDef with this script:
> https://github.com/sympa-community/sympa/blob/788c69b/META.json.pl
>
> I attached META.json generated with recent Sympa. I think cpanfile
> may also be generated in similar way and it will contain enough
> information for your plan.
>
> (FYI, Chapter "Customizing Sympa" in current documentation classifies
> "Optional features" roughly referring to recommended packages in
> optional_features)
>
Shame on me, I didn't noticed that you attached the META.json when I
wrote (during the hackathon) a script to generate a cpanfile from
ModDef: I could have use the generated META.json to generate cpanfile
(Module::CPANfile can read a META.json and create a cpanfile from it)
or just make it generate both META.json and cpanfile.
Anyway, it wasn't a big deal to write my script and it generated a
cpanfile with quite the same things than your META.json.
Then we thought about how you install Sympa and mostly, how you choose
the optional modules to install, we discussed about how we could
provide a way to ease this choice. Indeed, with the current installer,
you have the description of the optional modules, like "Required to
sign, verify, encrypt and decrypt S/MIME messages." for Crypt::SMIME.
With a cpanfile you do something like:
cpanm --installdeps . --with-feature=pg --with-feature=ldap
There is no "Do you plan to do X? You should install this."
While some optional modules are clearly some conscious choices that
you need to think about (like "Which database will I use? Will I use
LDAP auth or as list datasource?"), some other are not so obvious, so
we thought we could put them in cpanfile as recommendations, not as
features. Net::DNS is one of these recommended modules, since there is
a lot of chances that you will have DMARC problems and that's
something you can't control because DMARC policies are controled by
the mail provider (I look at you, damn yahoo). Clone is another
recommended modules because it's a XS module, so it should make Sympa
a little bit faster.
So, with this, we could end with something like that:
cpanm --installdeps . --with-recommends --with-feature=pg --with-feature=ldap
(now I re-think about that, we should have put those recommended
modules as recommendations AND features to allow to install deps
without all the recommended modules but still be able to pick one (or
more) of them)
The list of the modules that should be recommended is not set in
stone, we just picked some of them by saying "This one, you may need
it because it make things faster, this one because not all people know
if their console support UTF-8 encoding", "This one? No, it's a
special case" (like CAS, LDAP…) and so on. We may have missed some, we
may have include some that should not have been included: we just
created a PoC.
You can read our cpanfile on create-cpanfile branch. Here's the
commit, along with a comment with my generate-cpanfile script:
https://github.com/sympa-community/sympa/commit/766bc0e1a98bb0f2b73ac12ba64a588da4258e23
NB: the create-cpanfile is forked from add-perltidy-test branch since
I was working on it and I created a cpanfile in it to easyly install
dev dependencies.
--
Luc
"La route est longue, mais la voie est libre…" https://framasoft.org
Framasoft ne vit que par vos dons (déductibles des impôts). Merci d'avance
pour votre soutien https://soutenir.framasoft.org
-
[sympa-developpers] Use Carton for Sympa?,
Luc Didry, 05/17/2018
- Re: [sympa-developpers] Use Carton for Sympa?, Luc Didry, 05/18/2018
-
Re: [sympa-developpers] Use Carton for Sympa?,
IKEDA Soji, 05/19/2018
- Re: [sympa-developpers] Use Carton for Sympa?, Luc Didry, 05/25/2018
Archive powered by MHonArc 2.6.19+.