Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mix deps.get --check-locked parameter #12184

Merged
merged 7 commits into from
Oct 10, 2022
Merged

Mix deps.get --check-locked parameter #12184

merged 7 commits into from
Oct 10, 2022

Conversation

Efesto
Copy link
Contributor

@Efesto Efesto commented Oct 10, 2022

Implements https://groups.google.com/g/elixir-lang-core/c/Jr2CS6o2elo/m/Lq3r5plfBQAJ proposal by introducing --check-locked argument to mix deps.get task.

When set and lockfile needs to be updated, mix deps.get will exit with non-zero status.

The idea is to have a way to prevent a CI pipeline from running successfully when a change in the application deps are not reflected in an update to the lockfile.

Similarly to bundler install --frozen and yarn --frozen-lockfile

TODO

  • E2E testing, I need support for this one

Marco Polita added 2 commits October 10, 2022 14:28
* introduces allow_updates option
* marks file path as option and no-more as optional argument
implements code style feedback

Co-authored-by: José Valim <jose.valim@gmail.com>
@josevalim
Copy link
Member

Thank you! I believe this is in the right direction but we need to discuss the name. --no-lockfile-update will most likely be read as "don't update the lockfile" instead of raising. Maybe --strict or --check-locked or --check-up-to-date are better.

@Efesto
Copy link
Contributor Author

Efesto commented Oct 10, 2022

Thank you! I believe this is in the right direction but we need to discuss the name. --no-lockfile-update will most likely be read as "don't update the lockfile" instead of raising. Maybe --strict or --check-locked or --check-up-to-date are better.

How does --frozen-lockfile sound?

@josevalim
Copy link
Member

Freeze is not a verb we use in Elixir. I don’t think it would have a meaning to most developers.

@josevalim
Copy link
Member

I would say let’s go with —check-locked, because “up to date” also has multiple meaning and —strict is vague. We can also call the internal option :check_locked.

@Efesto Efesto changed the title Mix deps.get --no-lockfile-update parameter Mix deps.get --check-locked parameter Oct 10, 2022
@josevalim josevalim merged commit b395381 into elixir-lang:main Oct 10, 2022
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@Efesto Efesto deleted the locked_lockfile branch October 10, 2022 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants