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

Add support for multiple templates in create fuels #2837

Closed
arboleya opened this issue Jul 25, 2024 · 4 comments · Fixed by #2851
Closed

Add support for multiple templates in create fuels #2837

arboleya opened this issue Jul 25, 2024 · 4 comments · Fixed by #2851
Assignees
Labels
feat Issue is a feature

Comments

@arboleya
Copy link
Member

arboleya commented Jul 25, 2024

Currently, we have only one template using NextJS.

Before we can add more templates, we need the basic infra to support N templates.

Then we'll be able to:

npm create fuels -- --template nextjs
npm create fuels -- --template <template-name>

The default version should continue working as it is now, using NextJS:

npm create fuels

This issue is just about pluralizing the template options but adds nothing new.

Follow-up issue:

@arboleya arboleya added the feat Issue is a feature label Jul 25, 2024
@arboleya arboleya changed the title Add basic infra around create fuels for supporting templates Add support for multiple templates in create fuels Jul 25, 2024
@Dhaiwat10 Dhaiwat10 self-assigned this Jul 26, 2024
@arboleya arboleya added the p1 label Jul 26, 2024
@maschad
Copy link
Member

maschad commented Jul 26, 2024

Thanks @arboleya for proposing this enhancement to support multiple templates. While I understand the potential benefits, I have some concerns about the long-term implications of maintaining multiple templates, particularly:

  1. Version synchronization: Keeping all templates up-to-date with the latest dependencies, best practices, documentation, comments etc. could become increasingly complex as the number of templates grows. This might lead to some templates falling behind in fuels versions or inconsistencies between templates, at the very least it will be slower to integrate new features across the multiple templates.

  2. Testing complexity: I assume we would write more e2e tests for each template and we'd have to ensure those pass across different environments, this could introduce new types of test failures, at the very least it would slow down the release process and require more CI resources.

  3. Feature parity issues: Maintaining feature parity across all templates can be challenging. We risk having some templates lag behind in capabilities, which could lead to a confusing or inconsistent experience for developers using different templates. E.g. We currently have the create fuels dApp walkthrough in NextJS, would we document this in multiple templates as well?

  4. Potential for unused or abandoned templates: Some templates may fall out of favour over time in usage amongst our developers but still require maintenance, leading to wasted resources. We'd need a clear policy on when and how to deprecate underused templates.

Given these concerns, I suggest we carefully consider whether the benefits of multiple templates outweigh these potential drawbacks. If we do proceed, we should start with a very limited number of well-chosen templates and have a clear strategy for managing these challenges.

The impetus behind #2781 was to provide flexibility to developers by using a less opinionated framework without introducing multiple templates, so I still would prefer to explore alternative ways to give that kind of flexibility at least.

@arboleya
Copy link
Member Author

These are all valid concerns, which we discussed before starting the create fuels CLI. In fact, these principles are why we still have only one template. They should continue to play their limiting role, ensuring this number grows controllably.

@salemalem
Copy link

If issue is solved, why docs still reference this issue?
image

@petertonysmith94
Copy link
Contributor

@salemalem This issue has indeed been finished, and this guide is now out of date, so I have created the following issue to migrate that guide.

In the meantime, the following documentation can be used.

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

Successfully merging a pull request may close this issue.

5 participants