On Mon, Jul 25, 2011 at 18:06, Luke Schafer <luke.s...@gmail.com> wrote:
> Perhaps a
> .Net app shelling calls to the node exe is the quickest solution?
Oh, please no! Porting npm to .Net would be a tremendous amount of
work. If you really want do this, that'd be totally fine, just don't
call it "npm" please, so that people don't expect me to support it.
Don't do it unless you think it'd be fun. If you DO think it would be
fun, then you have my blessing :)
> I'm keen to help, I just don't know where to start.
Ryan is right now working intently on making child_process.spawn work
on windows. That is a blocker for npm. npm runs scripts to install
packages, and shells out to execute tar and gzip. It cannot function
properly without child_process.spawn.
Next, npm depends on having gzip and tar in the OS already. That's a
bit painful for Windows users, but they'll probably just have to
suffer through installing gzip and tar themselves. (They'll have to
install gcc to make any binary addons work anyway, which is way more
painful.)
We've talked about getting gzip encoding/decoding streams into core,
but it's highly non-trivial. I have half of a fully-functional tar
implementation, but again, it's non-trivial, and requires a lot of
work yet.
Lastly, npm will have to write out .bat file shims instead of symlinks
for bin files. I haven't bothered with this just yet, since npm
requires child_process.spawn anyway, and can't run without it. But
very soon, I'll investigate that. It's been a long time since I did
any serious DOS scripting, but I know that it's possible to
programmatically generate a little proxy shim that runs a specific
program with the same set of arguments.
And, of course, there will be bugs. Several of them, I'm sure.
I hope to have all this done by the end of the year. It is a
several-month process.
(cc'ed to nodejs and npm mailing lists, since people keep asking this)
...
Next, npm depends on having gzip and tar in the OS already. That's a
bit painful for Windows users, but they'll probably just have to
suffer through installing gzip and tar themselves. (They'll have to
install gcc to make any binary addons work anyway, which is way more
painful.)
All but one of the tar implementations in JS that I've seen do not
properly handle extended pax headers, or global header files. The
only one I've seen that does (my node-tar repo) is pretty badly broken
in other ways. Here's the spec for the files that a conformant tar
program needs to be able to consume and generate:
http://cdrecord.berlios.de/private/man/star/star.4.html
(Note that many versions of gnutar and solaris tar do not satisfy this
requirement, either.)
On Thu, Jul 28, 2011 at 11:47, beriberikix <jmb...@gmail.com> wrote:
> And here's a simple gist for GZIPing: https://gist.github.com/417483
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
Well I meant technical limitations wrt node/npm internals. If all it
was, was that npm needed to be run in an administrative context
(trivial and not the least bit of a hurdle for windows devs) then I
doubt it would even be a bullet point.
I've got Windows running, and this is my priority for the time being.
So far, I've run into about 10 random unexpected cross-platform
failures in the process of getting the `npm -h` usage banner to print.
It's just a grind that's gonna take some time. No rockets need
sciencing, no brains to surger.
It took a bunch of code changes to be able to do that. Check the git
commit history ;)
> mkdir-p.js needed directory separation characters changed, and
> you can get a bit farther. tar.js is where I got stalled, since
> windows builds of tar seems to not accept absolute paths for -C
> meaning you have to get clever to get it to work.
Yep. We can't rely on there being a system tar. Need to do this in
JS. Bundling a tar.exe may be used as a stopgap.
C:\Documents and Settings\Administrator>tar
'tar' is not recognized as an internal or external command,
operable program or batch file.
On Mon, Sep 5, 2011 at 11:09, factor <factor...@gmail.com> wrote:It took a bunch of code changes to be able to do that. Check the git
> Well that's seems to be a bit of an exaggeration, npm can print the
> help text without any code changes,
commit history ;)
> mkdir-p.js needed directory separation characters changed, and
> you can get a bit farther. tar.js is where I got stalled, since
> windows builds of tar seems to not accept absolute paths for -C
> meaning you have to get clever to get it to work.
Yep. We can't rely on there being a system tar. Need to do this inJS. Bundling a tar.exe may be used as a stopgap.
C:\Documents and Settings\Administrator>tar
'tar' is not recognized as an internal or external command,
operable program or batch file.
That's the approach PHP and a few other platforms have taken. You can
specify a path using c:\foo but when you get it back, it'll be c:/foo.
It's a little weird for newcomers who are familiar with Windows, but
it's easy to get used to, and does work fine.