public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] NPM / NodeJS project
@ 2015-06-28 16:30 Michael Orlitzky
  2015-06-29  3:09 ` Andrew Udvare
  2015-06-30  7:56 ` Ian Delaney
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Orlitzky @ 2015-06-28 16:30 UTC (permalink / raw
  To: gentoo-dev; +Cc: bugs, neurogeek

I recently found a need for the CoffeeScript compiler[0] that runs on
top of NodeJS. Its test suite requires a bunch of other javascript
packages, and I wound up packaging enough of them to test CoffeeScript.

In the process I wrote an eclass to handle packages hosted on the npm
registry[1] and install them globally. I put all of this in an overlay
for now:

  https://github.com/orlitzky/npm

We don't have any standalone javascript packages in the tree at the
moment but I know there's been some interest before. Is anyone still
(planning on) working on javascript stuff in-tree?

If not, I'll probably commit dev-lang/coffee-script to the tree without
its test suite. But if so, the eclass and few dev-js packages I have
might be a good start. Then I could add coffee-script with its test
suite working.


[0] http://coffeescript.org/
[1] https://www.npmjs.com/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] NPM / NodeJS project
  2015-06-28 16:30 [gentoo-dev] NPM / NodeJS project Michael Orlitzky
@ 2015-06-29  3:09 ` Andrew Udvare
  2015-07-03 22:21   ` Michael Orlitzky
  2015-06-30  7:56 ` Ian Delaney
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Udvare @ 2015-06-29  3:09 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]


> On 2015-06-28, at 09:30, Michael Orlitzky <mjo@gentoo.org> wrote:
> 
>  https://github.com/orlitzky/npm <https://github.com/orlitzky/npm>We don't have any standalone javascript packages in the tree at the
> moment but I know there's been some interest before. Is anyone still
> (planning on) working on javascript stuff in-tree?

Not in tree, but I was planning on an idea called enpm but I realised resolving dependencies in npm is horrible, almost as bad as the live code on building with Go. The only way I could see this work is to package the dependencies with the app in a single tarball similar to what Vagrant does now. It is not the Gentoo way but these new systems (gem, Composer, even Go) seem to not care very much about having packages you can consider stable, nor predictable dependencies.

I would still find it useful to install CoffeeScript (among others like PhantomJS) via Portage for global use. Right now I hack on ~/node_modules/.bin to PATH in my shell (luckily that works).

[-- Attachment #2: Type: text/html, Size: 1559 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] NPM / NodeJS project
  2015-06-28 16:30 [gentoo-dev] NPM / NodeJS project Michael Orlitzky
  2015-06-29  3:09 ` Andrew Udvare
@ 2015-06-30  7:56 ` Ian Delaney
  2015-06-30 14:06   ` Michael Orlitzky
  1 sibling, 1 reply; 6+ messages in thread
From: Ian Delaney @ 2015-06-30  7:56 UTC (permalink / raw
  To: gentoo-dev

On Sun, 28 Jun 2015 12:30:25 -0400
Michael Orlitzky <mjo@gentoo.org> wrote:

> I recently found a need for the CoffeeScript compiler[0] that runs on
> top of NodeJS. Its test suite requires a bunch of other javascript
> packages, and I wound up packaging enough of them to test
> CoffeeScript.
> 
> In the process I wrote an eclass to handle packages hosted on the npm
> registry[1] and install them globally. I put all of this in an overlay
> for now:
> 
>   https://github.com/orlitzky/npm
> 
> We don't have any standalone javascript packages in the tree at the
> moment but I know there's been some interest before. Is anyone still
> (planning on) working on javascript stuff in-tree?
> 
> If not, I'll probably commit dev-lang/coffee-script to the tree
> without its test suite. But if so, the eclass and few dev-js packages
> I have might be a good start. Then I could add coffee-script with its
> test suite working.
> 
> 
> [0] http://coffeescript.org/
> [1] https://www.npmjs.com/
> 

Is this what I prompted about a year or more ago, and drew no interest
in pursuing the npm path?  I cited an eclass called npm.eclass in a
dev's overlay. The conclusion was that using npm to install anything
competed with portage at a level that made it a 'no go'. This came
from members of the portage 'team'. It is a very awkward topic.

-- 
kind regards

Ian Delaney


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] NPM / NodeJS project
  2015-06-30  7:56 ` Ian Delaney
@ 2015-06-30 14:06   ` Michael Orlitzky
  2015-06-30 17:04     ` Jesus Rivero (Neurogeek)
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Orlitzky @ 2015-06-30 14:06 UTC (permalink / raw
  To: gentoo-dev

On 06/30/2015 03:56 AM, Ian Delaney wrote:
> 
> Is this what I prompted about a year or more ago, and drew no interest
> in pursuing the npm path?  I cited an eclass called npm.eclass in a
> dev's overlay. The conclusion was that using npm to install anything
> competed with portage at a level that made it a 'no go'. This came
> from members of the portage 'team'. It is a very awkward topic.
> 

No, but we may have wound up with a similar idea. I only became
interested last week when somebody gave me a coffeescript program to
deploy at work and there was no coffeescript.

My eclass isn't using npm to do the actual install, since npm won't do a
global install. I am using it as a lazy way to run the test suite ("npm
test"), and I'm defaulting to npmjs.org as HOMEPAGE/SRC_URI because they
have nice predictable URLs. But the src_install manually copies the
javascript bits to a location where node can find them.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] NPM / NodeJS project
  2015-06-30 14:06   ` Michael Orlitzky
@ 2015-06-30 17:04     ` Jesus Rivero (Neurogeek)
  0 siblings, 0 replies; 6+ messages in thread
From: Jesus Rivero (Neurogeek) @ 2015-06-30 17:04 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2379 bytes --]

FWIW, I also bumped into this in my previous job.
I even wrote this (https://github.com/neurogeek/g-npm) which is incomplete
but saved me a bunch of time creating a crazy amount of npm ebuilds.

<kinda rant>
My experience is, this isn't worth it. npm is a mess, is
maintainer-unfriendly (although it might be argued that it is
developer-friendly) and they basically don't care about about distributions
at all.
npm packages are not meant to be installed globally. They are content with
having duplicate dependencies laying around everywhere.

Their "semantic versioning" sucks. They 1.4.1.2 can break backwards
compatibility with 1.4.1.1 and nobody cares.
I didn't find a way to download specific versions, and had trouble when
they did stuff like "depend on 1.4.x", because of the above.

Also, although minor point, the other reason I stopped pursuing this was
because I think npm packages are needlessly small. So, you might want to
install a package that depends on tens of other packages that depend on
tens of packages themselves. Most of this packages are 10 lines of code.
So, I ended up real fat with an dev-nodejs category with over a hundred
packages.
</kinda rant>

Having said all that, this was at least a couple of years ago. They might
have come to their senses by now.

Cheers,

On Tue, Jun 30, 2015 at 10:06 AM, Michael Orlitzky <mjo@gentoo.org> wrote:

> On 06/30/2015 03:56 AM, Ian Delaney wrote:
> >
> > Is this what I prompted about a year or more ago, and drew no interest
> > in pursuing the npm path?  I cited an eclass called npm.eclass in a
> > dev's overlay. The conclusion was that using npm to install anything
> > competed with portage at a level that made it a 'no go'. This came
> > from members of the portage 'team'. It is a very awkward topic.
> >
>
> No, but we may have wound up with a similar idea. I only became
> interested last week when somebody gave me a coffeescript program to
> deploy at work and there was no coffeescript.
>
> My eclass isn't using npm to do the actual install, since npm won't do a
> global install. I am using it as a lazy way to run the test suite ("npm
> test"), and I'm defaulting to npmjs.org as HOMEPAGE/SRC_URI because they
> have nice predictable URLs. But the src_install manually copies the
> javascript bits to a location where node can find them.
>
>
>


-- 
Jesus Rivero (Neurogeek)
Gentoo Developer

[-- Attachment #2: Type: text/html, Size: 3214 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] NPM / NodeJS project
  2015-06-29  3:09 ` Andrew Udvare
@ 2015-07-03 22:21   ` Michael Orlitzky
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Orlitzky @ 2015-07-03 22:21 UTC (permalink / raw
  To: gentoo-dev

On 06/28/2015 11:09 PM, Andrew Udvare wrote:
> 
> I would still find it useful to install CoffeeScript (among others like
> PhantomJS) via Portage for global use. Right now I hack on
> ~/node_modules/.bin to PATH in my shell (luckily that works).

It doesn't look like anyone wants to get involved with this until
upstream settles down a bit, so I've committed dev-lang/coffee-script a
few minutes ago sans-eclass.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-03 22:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-28 16:30 [gentoo-dev] NPM / NodeJS project Michael Orlitzky
2015-06-29  3:09 ` Andrew Udvare
2015-07-03 22:21   ` Michael Orlitzky
2015-06-30  7:56 ` Ian Delaney
2015-06-30 14:06   ` Michael Orlitzky
2015-06-30 17:04     ` Jesus Rivero (Neurogeek)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox