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

Assert minimal copier version #198

Closed
yajo opened this issue Apr 30, 2020 · 4 comments · Fixed by #205
Closed

Assert minimal copier version #198

yajo opened this issue Apr 30, 2020 · 4 comments · Fixed by #205
Milestone

Comments

@yajo
Copy link
Member

yajo commented Apr 30, 2020

The template needs a new key:

# copier.yml
_min_copier_version: v3.1.0

Otherwise the template might fail badly if a template is done for a version that i.e. includes #190 and is executed under a copier that doesn't have it.

@pawamoy You might be interested in this.

@yajo yajo added this to the v3.1.0 milestone Apr 30, 2020
@pawamoy
Copy link
Contributor

pawamoy commented Apr 30, 2020

Yes, good catch, displaying a warning when the version is too low is way better than starting to generate and fail.

@yajo
Copy link
Member Author

yajo commented Apr 30, 2020

I'd say an error more than a warning... If the templater took the time to write this constraint, it's better to enforce it.

@yajo yajo mentioned this issue May 7, 2020
2 tasks
@pawamoy
Copy link
Contributor

pawamoy commented May 7, 2020

Unfortunately, I don't think it will be possible to write tests for that, because poetry-dynamic-versioning does not work with poetry run, and so we'll not be able to retrieve the current version to compare it to a _min_copier_version. Any workaround idea 😕 ? Maybe I could modify copier.__version__ myself in the tests 🤔

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

Successfully merging a pull request may close this issue.

2 participants