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

Enable locking versions in Mintfile.lock or sth similar #263

Open
bartlomiejswierad-vodeno opened this issue May 15, 2023 · 4 comments
Open

Comments

@bartlomiejswierad-vodeno

Hi!

I have a feature request to be able to lock versions of mint packages in some file we could add to repository of a project. Currently, we tried using locking versions prepared for use in Mintfile but it does not work as expected.

Mintfile example:

Current state:

  1. after using mint bootstrap which installs the specified versions of packages
  2. running mint run swiftlint tries to use the newest version of the package instead of the one specified in the Mintfile.

Expected:

  1. mint bootstrap installs the version specified in a lock-file (or creates one if it doesn't exist yet).
  2. mint run swiftlint runs the version specified in the lock-file.
  3. We can update the locked version by calling something like mint update.
@yonaskolb
Copy link
Owner

The Mintfile does not auto update so essentially IS a lockfile. The issue you're running into is that mint run swiftlint is not using your mintfile for some reason. What is the Mintfile path relative to the command you run?

@bartlomiejswierad-vodeno
Copy link
Author

bartlomiejswierad-vodeno commented May 16, 2023

You're right. After providing Mintfile path expicitly, it all works now. What I'm still missing are features like update or outdated to release full potential of it.

@r-dent
Copy link

r-dent commented Jul 5, 2023

IMHO mint run swiftlint should fail when no Mintfile could be found.

Otherwise e.g. build scripts run successfully even though the wrong (latest) version of a tool was installed, because that's the fallback.

@stefanomondino
Copy link

Just adding my 2cents on this...
Other softwares like bundler (Gemfile) are exploring the folder structure backwards until they find their "base file".
I only recently (see issue with sourcery above) found out that you have to provide Mintfile explicitly when you are running mint from a subfolder of your project.

Felt a little bit counter-intuitive to me, but I don't know if there are reasons behind this choice.
it would be great if Mint could find its Mintfile "automatically".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants