all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Artur Malabarba <bruce.connor.am@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Yuri D'Elia <wavexx@thregr.org>,
	Bozhidar Batsov <bozhidar@batsov.com>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: package.el: soft dependencies?
Date: Thu, 16 Jul 2015 12:35:32 +0100	[thread overview]
Message-ID: <CAAdUY-JfG80MA6Chx8hLOn1Ozjr1MHUpX9+nK+GDcK2Avu8Ujw@mail.gmail.com> (raw)
In-Reply-To: <jwvpp3us4cp.fsf-monnier+emacs@gnu.org>

If package.el is going to do this, it might be good to add support for
optional dependencies in other places too, like in the byte-compiler.

For instance, we could have a form like the following

(require-optionally 'projectile
  (projectile-ag projectile-dired ...))

When the byte-compiler reads this, it will try to require projectile.
If projectile is available, great, if it isn't then the compiler
treats all those listed functions and macros as `ignore'.

This would sometimes make it more convenient for the developer to
support optional features, because you would only need to account for
the possibility of them return nil, instead of always being forced to
check if they're `fbound'. Though sometimes you'd still need to check
to manually.



  reply	other threads:[~2015-07-16 11:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14 20:53 package.el: soft dependencies? Yuri D'Elia
2015-07-14 21:28 ` Rasmus
2015-07-14 21:52   ` Yuri D'Elia
2015-07-14 22:03     ` Yuri D'Elia
2015-07-15 10:06       ` Artur Malabarba
2015-07-15 15:09         ` Bozhidar Batsov
2015-07-14 23:32 ` Stefan Monnier
2015-07-16 11:35   ` Artur Malabarba [this message]
2015-07-16 12:23     ` Tassilo Horn

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

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

  git send-email \
    --in-reply-to=CAAdUY-JfG80MA6Chx8hLOn1Ozjr1MHUpX9+nK+GDcK2Avu8Ujw@mail.gmail.com \
    --to=bruce.connor.am@gmail.com \
    --cc=bozhidar@batsov.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=wavexx@thregr.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.