From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: package.el: soft dependencies? Date: Thu, 16 Jul 2015 12:35:32 +0100 Message-ID: References: Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1437046574 13548 80.91.229.3 (16 Jul 2015 11:36:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Jul 2015 11:36:14 +0000 (UTC) Cc: Yuri D'Elia , Bozhidar Batsov , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 16 13:36:13 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZFhSX-0005xF-8b for ged-emacs-devel@m.gmane.org; Thu, 16 Jul 2015 13:36:13 +0200 Original-Received: from localhost ([::1]:39679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFhSW-0000jV-NI for ged-emacs-devel@m.gmane.org; Thu, 16 Jul 2015 07:36:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFhS1-0000gt-9j for emacs-devel@gnu.org; Thu, 16 Jul 2015 07:35:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFhRu-0002HI-Qg for emacs-devel@gnu.org; Thu, 16 Jul 2015 07:35:41 -0400 Original-Received: from mail-la0-x22e.google.com ([2a00:1450:4010:c03::22e]:36406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFhRu-0002H2-I7 for emacs-devel@gnu.org; Thu, 16 Jul 2015 07:35:34 -0400 Original-Received: by lagw2 with SMTP id w2so41662962lag.3 for ; Thu, 16 Jul 2015 04:35:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=2Kp3OPYf5MnS8UEsluKQiGVJety7VBbGv84D1VTQRfg=; b=qsN177fmog7yomXRk20b4UUikiz5zPP/WLjcnn34MnVzCcEKiLP8lAWh/pOcfbvkuQ uFaMYea6M52hRnqs/f6nRg0E+Dlw4AvzSoechbytQZwJoQcl1LNt1kXD9uLvrDBKScAs 1jT8qMtrWuevrCxemm6/przfQnvtTyiwmjR7Na17CmBeLnjpk9BFdUwzrqwOLZajFrmS LSDoY63WRlYlRzV2bF6ZW5Yj8gxzrslFlO2waBwFcpKWPqutVno4GHh3kRJ8t04zVFk7 QjzxaX6c8QmdWbFlkKyhUIWYuVudpML7khDWprwvAgjaxF9B2Rsrbq8X7GuLyXoD95oM nRew== X-Received: by 10.152.18.162 with SMTP id x2mr8950193lad.73.1437046532916; Thu, 16 Jul 2015 04:35:32 -0700 (PDT) Original-Received: by 10.25.214.133 with HTTP; Thu, 16 Jul 2015 04:35:32 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: iWdxSwKr5qOwQNFiM5yPbZ02Pyo X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:187897 Archived-At: 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.