All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anders Darander <anders@chargestorm.se>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/7] create_npm.py: add devDependencies to depends
Date: Mon, 6 Mar 2017 08:11:24 +0100	[thread overview]
Message-ID: <20170306071124.x4hf35gtlrlgjm2v@ad.chargestorm.se> (raw)
In-Reply-To: <8048065.zPYkRBxOXs@peggleto-mobl.ger.corp.intel.com>

Hi,

* Paul Eggleton <paul.eggleton@linux.intel.com> [170302 02:44]:

> On Thursday, 2 March 2017 6:19:55 AM NZDT Anders Darander wrote:
> > NpmRecipeHandler(RecipeHandler):
> >      def get_npm_package_dependencies(self, pdata):
> >          dependencies = pdata.get('dependencies', {})
> >          optionalDependencies = pdata.get('optionalDependencies', {})
> > +        devDependencies = pdata.get('devDependencies', {})
> >          dependencies.update(optionalDependencies)
> > +        dependencies.update(devDependencies)
> >          depsfound = {}
> >          optdepsfound = {}
> > +        devdepsfound = {}
> >          for dep in dependencies:
> >              if dep in optionalDependencies:
> >                  optdepsfound[dep] = dependencies[dep]
> > +            elif dep in devDependencies:
> > +                devdepsfound[dep] = dependencies[dep]
> >              else:
> >                  depsfound[dep] = dependencies[dep]
> > -        return depsfound, optdepsfound
> > +        return depsfound, optdepsfound, devdepsfound

> >      # FIXME this is effectively duplicated from lib/bb/fetch2/npm.py
> >      # (split out from _getdependencies())

> This worries me slightly - I've no familiarity with angular2 but AIUI in 
> general the dev dependencies most often aren't needed, and may be onerous to 
> pull in and build - should we really be pulling those in unconditionally?

I fully understand. However, I found no obvious way of doing this
conditionally. At least, the devDependencies won't be used during npm
install, unless you add NPM_INSTALL_DEV = "1" to the recipe in question.

Well, I guess, it could be possible to add a command line switch to
recipetool; though, in that question, I've got a few questions. Is it
possible to add this only for create_npm? (Ie not for generation of
other recipes?) How to add this to devtool (and have it propagate for
npm-packages only?

Cheers,
Anders

-- 
Anders Darander, Senior System Architect
ChargeStorm AB / eStorm AB


  reply	other threads:[~2017-03-06  7:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-01 17:19 [PATCH 0/7] create_npm: fixes to allow eg Angular2 based applications Anders Darander
2017-03-01 17:19 ` [PATCH 1/7] create_npm.py: add devDependencies to depends Anders Darander
2017-03-02  1:44   ` Paul Eggleton
2017-03-06  7:11     ` Anders Darander [this message]
2017-03-01 17:19 ` [PATCH 2/7] create_npm.py: convert MIT/X11 to MIT Anders Darander
2017-03-03  1:18   ` Khem Raj
2017-03-06  7:21     ` Anders Darander
2017-03-09  6:22       ` Josef Holzmayr
2017-03-01 17:19 ` [PATCH 3/7] lib/oe/package.py: remove @ from package name Anders Darander
2017-03-01 17:19 ` [PATCH 4/7] classes/npm: allow installation of devDependencies Anders Darander
2017-03-01 17:19 ` [PATCH 5/7] scripts/lib/create_npm: rewrite see license in eula Anders Darander
2017-03-01 17:20 ` [PATCH 6/7] scripts/lib/create_npm: handle AND and OR in licenses Anders Darander
2017-03-01 17:20 ` [PATCH 7/7] scripts/lib/create_npm: handle Public Domain licenses Anders Darander

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=20170306071124.x4hf35gtlrlgjm2v@ad.chargestorm.se \
    --to=anders@chargestorm.se \
    --cc=openembedded-core@lists.openembedded.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.
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.