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

create generic init implementation #452

Open
dariuszd21 opened this issue Sep 6, 2024 · 1 comment
Open

create generic init implementation #452

dariuszd21 opened this issue Sep 6, 2024 · 1 comment
Labels
Enhancement New feature or request triaged

Comments

@dariuszd21
Copy link
Contributor

dariuszd21 commented Sep 6, 2024

What needs to get done

Generic InitCommand should be created, so all the crafts can use it, that allows:

  • specifying name as an option and project_dir as a positional argument (the way cargo / uv works)
  • use Jinja2 for templates
  • support profiles e.g. by searching templates for subdirectories and listing them as options
  • by default it will allow to be run in non-empty directory, as long as it creates only new files (no-overrides). This behavior may be overwritten (opt-out), so charmcraft will be able to error-out in non-empty directory

Why it needs to get done

Currently all the applications have a separate way of handling init.
We should create a generic version, that everyone can use.
It will enable create specific profiles in snapcraft, make our codebase smaller and it will be easier to maintain in the single place.

@dariuszd21 dariuszd21 added Enhancement New feature or request triaged labels Sep 6, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3335.

This message was autogenerated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request triaged
Projects
None yet
Development

No branches or pull requests

1 participant