homologist
Hello
i found a post from Yehuda katz where he explain the reason to version and not version Gemfile.lock in ruby. To me it feels strange that we need to say explicitly, what we where trying to say with declarations. What about you?
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
jeremyjh
I think he explains it pretty well. For production applications, your builds need to be 100% reproducible. Every change you deploy, should be traceable to a diff in your repository whether it is your code, a dependency or a transitive dependency.
Libraries on the other hand, need to “float” - they should be compatible with various versions of their own dependencies, otherwise users get locked to libraries that they cannot upgrade as they need to. This seems to happen a lot in the Java/Maven ecosystem, where no one can build their dependencies from source, and are at the mercy of the slowest upstream to update a new downstream that they need.
josevalim
The downside of not having a lock in libraries is that contributing to a library may become harder for a newcomer because they may be unlucky to clone it exactly when a breaking dependency is introduced.
Furthermore, you usually have a small group of developers working on a project and their local checkout all have an old
mix.lock. So most of the time, you are not updating the dependencies, unless you are constantly removing your localmix.lockfile.If you want to test against latest versions, do it on CI, where you will be running it constantly and without the risk of pushing the burden to new contributors.
ericmj
This is a good idea. You can set up a specific CI build that deletes
mix.lockbefore runningmix deps.getand it will run tests with the same versions users will get when they add your dependency to their project.homologist
What about start up? Because they don t really have legacy when they start. Shouldn they focus on building a realliable dev env for everybody? Rather than locking?
I do agree that If you have legacy code It s the way to go. And even if everybody has the same env you might have to lock anyway. But I just feel like the use case of lock could be narrowed for the greater good. Isn t declarative the best for these kind of problems?
josevalim
If you are a startup you most likely want to focus on your business logic rather than focus on upgrading dependencies or debugging production issues because your dev and test environments ended-up being different than your production one.
homologist
Great and why not have more CI tools in the elixir standard lib, by that i mean something like mix format --check-formatted . That s a great tool.
jeremyjh
Mix doesn’t use a dependent library’s lock file when resolving package versions though, right? Just the constraints in its deps. So the lock file is just a tool for the developer of the library. I think this systematically applies the approach advocated, rather than contradicting it.
homologist
But shouldn t we be using stuff like Docker/Ansible/Vagrant for all that?
josevalim
No, it doesn’t. But I was talking about the top-level. Imagine I remove the
mix.lockfrom Ecto. Now a person who is trying to contribute to Ecto for the first time may clone it and get a bad dependency which may be the source of confusion.jeremyjh
These do not solve the same problem. Those tools do not resolve your Elixir library dependencies when you build your application. You deploy your built application with those sort of tools.
And having reproducible builds has nothing to do with startups or legacy code. It has to do with not wanting stuff to break for unexplainable reasons. Frankly, I’d consider it unprofessional to deploy whatever random code resolves that day to production.