News for hackers. Stuff that matters.
Re:NPM proxy users receiving ERR 418 I'm a teapot by pmlnr on Tuesday May 29, 2018 @04:21AM (#17177307)
> Package management is hard.

and this is why writing yet another package manager instead of gradually improving existing ones - rpm, deb, etc. - is far from ideal.

Re:NPM proxy users receiving ERR 418 I'm a teapot by TheCoreh on Tuesday May 29, 2018 @05:21AM (#17177628)
rpm and deb are tied to specific operating system distributions, and are also meant to install packages globally on a system. npm, on the other hand, is meant to be cross-platform and is primarily focused on installing dependencies on a per-project basis. Its rules for lookup, matching, deduplication etc are mostly defined or informed by Node.JS conventions. I don't think apt or rpm would be willing to cover these use cases, and even if they did, it would probably not be worth it
Re:NPM proxy users receiving ERR 418 I'm a teapot by LoSboccacc on Tuesday May 29, 2018 @05:37AM (#17177694)
the maven model has worked quite well so far.
Re:NPM proxy users receiving ERR 418 I'm a teapot by codefined on Tuesday May 29, 2018 @08:51AM (#17178648)
I'm not sure if it's a model thing or just that software has bugs, but lots of people really dislike Maven. Not sure it's an example of a good package manager.
Re:NPM proxy users receiving ERR 418 I'm a teapot by peeters on Tuesday May 29, 2018 @10:23AM (#17179385)
Do they hate the package management or the build tool? Maven introduced a new package format (the Project Object Model, pom.xml) at the same time as introducing a very declarative build tool.

The really confusing part is that the two are conflated by design: if building with Maven, your project's pom.xml also contains the declarative Maven configuration used to build your package, instead of containing just the package metadata (name, dependencies, etc). But that's not required, and it need not be part of the *.pom XML file deployed in the published package.

Since release, many build tools have been introduced that can consume and produce POM-compatible packages but don't require you to use Maven itself as your builder (Ivy for Ant, gradle for writing build scripts in Groovy, SBT for Scala, etc).

Re:NPM proxy users receiving ERR 418 I'm a teapot by _asummers on Tuesday May 29, 2018 @01:29PM (#17181212)
Just a note: you can use Gradle for Java too. I haven't built a Java project without Gradle since like 2010 or so.
Re:NPM proxy users receiving ERR 418 I'm a teapot by peeters on Tuesday May 29, 2018 @01:55PM (#17181454)
Yeah sorry if I wasn't clear, in Gradle the build script is written in Groovy. It is used to build any number of project types.
Re:NPM proxy users receiving ERR 418 I'm a teapot by vorg on Tuesday May 29, 2018 @04:10PM (#17182547)
Gradle build scripts can also be written in Kotlin.
Re:NPM proxy users receiving ERR 418 I'm a teapot by tlarkworthy on Tuesday May 29, 2018 @12:32PM (#17180672)
I spent yesterday trying to get protobuffers working in maven, see http://vlkan.com/blog/post/2015/11/27/maven-protobuf/ for the pain.

Anything counter to maven's way is a PITA. In this case, Maven dislikes platform specific binaries.

Re:NPM proxy users receiving ERR 418 I'm a teapot by jrs95 on Tuesday May 29, 2018 @09:30AM (#17178961)
The CLI is among the least intuitive I’ve ever used, and pom.xml is pretty verbose and complex. That being said, it works very well and I’ve never had a problem with it (other than it’s aesthetics) after grokking it.
Re:NPM proxy users receiving ERR 418 I'm a teapot by realusername on Tuesday May 29, 2018 @10:13AM (#17179319)
Technically yes, on the usability part there's still a long way to go...
Re:NPM proxy users receiving ERR 418 I'm a teapot by pmlnr on Tuesday May 29, 2018 @08:57AM (#17178690)
> globally on a system

In the world of containers? Come on.

Re:NPM proxy users receiving ERR 418 I'm a teapot by solatic on Tuesday May 29, 2018 @09:05AM (#17178747)
You understand that you can install a deb/rpm inside a container, right?

The conservation of complexity is at play here. Either you have a quasi-complex deb/rpm, and a simple Dockerfile with a RUN command installing it, or you have a quasi-complex Dockerfile which does all the packaging work itself.

Re:NPM proxy users receiving ERR 418 I'm a teapot by pmlnr on Tuesday May 29, 2018 @11:04AM (#17179759)
> You understand that you can install a deb/rpm inside a container, right?

That's exactly why I replied. deb/rpm in container is a reasonable choice, and that way, they aren't global for the system but local in the container.

Re:NPM proxy users receiving ERR 418 I'm a teapot by dEnigma on Tuesday May 29, 2018 @05:11AM (#17177576)
Unless the existing ones would require radical changes to realize your vision, which would be hard to do in a gradual manner and probably lead to more problems than just writing something from scratch.
Re:NPM proxy users receiving ERR 418 I'm a teapot by JepZ on Tuesday May 29, 2018 @06:52AM (#17177963)
Well, package management often starts too simple. Sadly, most people who build new ones seem to ignore the lessons from earlier projects. In my opinion, Paludis/Cave [1] is a decent example of which cases have to be handled, but as it uses the ebuild/exheres system it is slow as hell. The user experience isn't that good either, but at least they know how to do proper dependency management (e.g. keeping the system as stable as possible during updates by using a reasonable order).

For anybody who wants to build a package manager I highly recommend to take a look at what Paludis does (not necessarily how they do it).

[1]: https://paludis.exherbo.org

Re:NPM proxy users receiving ERR 418 I'm a teapot by filmor on Tuesday May 29, 2018 @09:30AM (#17178959)
I didn't use cave, but I remember using Paludis instead of Portage on Gentoo about 15 years ago, and it was really really fast at the actual package management tasks. The builds themselves take time of course, and especially for smaller packages the "./configure" part is infuriating, but that's nothing a package manager can fix.
Re:NPM proxy users receiving ERR 418 I'm a teapot by JepZ on Tuesday May 29, 2018 @01:11PM (#17181050)
In comparison to Portage it is fast, but I wouldn't consider Portage a benchmark ;-) and if you compare Paludis with Apt/Yum/Pacman and the likes it is still very slow (e.g. comparing installing binary packages).

The comparison isn't completely fair, as Paludis has a much better dependency resolution algorithm (in terms of quality), but I think the main difference comes from the package format. Ebuilds/exheres are Bash scripts which need to be evaluated in order to obtain basic information like for example build- or run-time dependencies. So to find out which packages should be updated, Paludis has to evaluate a few thousand bash scripts while other package formats allow much quicker algorithms.

Cave is just a newer front-end for Paludis which improves the user experience a bit, but the Performance should be pretty much the same.

Re:NPM proxy users receiving ERR 418 I'm a teapot by digi_owl on Tuesday May 29, 2018 @11:11AM (#17179851)
> Sadly, most people who build new ones seem to ignore the lessons from earlier projects.

This applies to FOSS in general, and then some...