Hacker News new | ask | show | jobs
by airocker 1310 days ago
I think it is an overkill to have your dev environment different from your deploy environments. This would mean you maintain dev environments separately than deploy environments. It would mean you are debugging something other than you are testing and deploying.

About reproducibility, unless nix promises to fix all upstreams (apt, pypi ??), I don't see how it can fix reproducibility on the client side only.

3 comments

Don't know why it is downvoted but isn't it a legitimate concern that if dev and prod environments are produced differently with different tool chains, it might result in discrepancies?

Concrete example, dev environment with nix but production is Dockerfile with apt getting packages?

Thoughts?

That question never stopped developers from getting Apple hardware and OSX at their workplaces and it seems they've been productive, even though hardly anyone except mobile developers deploy anything on OSX. Besides, what's the point of having a production environment based on apt if it can be derived from the same graph of all dependencies that you use for building and running your software locally by Nix? [1] There isn't need for apt-based images if you've been utilizing Nix already.

[1] https://nixos.org/manual/nixpkgs/stable/#ssec-pkgs-dockerToo...

Sure, but if you develop C++ code on mac, you cannot debug locally using the same compiler that you will deploy upon. Maybe JVM , node etc for purely UI programming may work on Mac because they have support for it, but why depend on the tool writer (JVM, Node) to work on mac when we are developing an OS specially for development?
> Concrete example, dev environment with nix but production is Dockerfile with apt getting packages?

> Thoughts?

Canonical answer is to use Nix to generate the image that goes out to prod as well, based on the same versions used in your devenv.

You're right, we should work on everyone using NixOS, that way dev and deploy is the same :)
well in that case, the easy way to understand nix is : "A new linux variant and package manager that can compile all packages from source". Why confuse users it has anything to do with dev environments. If your initial product is for development spaces only, it will only complicate things and nobody would use.
But that's not the best part, the best part is having all of the packages and having them work without dependency hell
The concept is definitely nice.
But unless you're doing all your development on cloud servers that exactly mirror the deployment architecture of your production cloud (I'm assuming we're discussing cloud application development here), then the environments are already different.

Some differences are incidental (e.g. developers using different operating systems) and Docker can help reduce those, for sure. By some differences are essential and desirable (e.g. you don't deploy your compiler).

I'm starting to think it's best to first reduce the number of differences that matter. E.g. if you're using an interpreteded language, reduce or isolate native dependencies so that most code can just depend on the right runtime version.