Hacker News new | ask | show | jobs
by wg0 1310 days ago
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?

2 comments

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.