From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pjotr Prins Subject: Re: Cyclic npm dependencies Date: Sat, 24 Nov 2018 17:38:57 +0100 Message-ID: <20181124163857.zgq6arhmyg23favy@thebird.nl> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQaxV-0002Hw-1u for guix-devel@gnu.org; Sat, 24 Nov 2018 11:39:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gQaxP-0002bk-Vo for guix-devel@gnu.org; Sat, 24 Nov 2018 11:39:04 -0500 Received: from mail.thebird.nl ([94.142.245.5]:43056) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gQaxP-0002Z5-PM for guix-devel@gnu.org; Sat, 24 Nov 2018 11:38:59 -0500 Content-Disposition: inline In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Jelle Licht Cc: guix-devel On Sat, Nov 24, 2018 at 03:41:35PM +0000, Jelle Licht wrote: > Hey swedebugia, > I will still send a more elaborate reply to the general npm-importer > thread later this week, but we can assume that generally these > recursive dependencies can be untangled by looking at the different > versions of the dependencies. > So in your example, I imagine an input chain like: > node-glob 0.1 -> node-rimraf 0.1 -> node-glob 0.2 -> node-rimraf 0.2 > -> .... -> node-glob 1.0 -> node-rimraf 1.0 > While *extremely* annoying to untangle, this is definitely doable. Appears to me that it would suffice to pick the latest version. In case there is no clear version info just pick whatever is there. In general this should work. Any unit tests should show breakage. Circular dependencies are (unfortunately) getting more common. Not only in npm, but in all ad hoc package managers. I think their assumption is too that you pick the latest. Pj.