go-sprout / sprout

From sprig to sprout - Useful template functions for Go templates with steroids
https://sprout.atom.codes
MIT License
94 stars 3 forks source link

chore(roadmap-v1): welcome on sprout 🌱 #1

Open 42atomys opened 7 months ago

42atomys commented 7 months ago

Migrating to Sprout 🌱

Introduction

Welcome to the roadmap for our ambitious project: Evolve Sprig to Sprout. This project is inspired by the core ideas of Sprig, a Go template function library known for its robustness and ease of use. Our mission with Sprout is to take the foundation that Sprig has laid down and evolve it further, addressing some of the challenges and limitations we've identified. Our ultimate goal is to create a more streamlined, efficient, and user-friendly template function framework that can cater to a broader range of use cases without compromising on performance and flexibility.

[!IMPORTANT] The organisation @go-sprout have receive the project.

Key Objectives

Below are the specific objectives we aim to achieve with the Sprout project:

1. Minimize Dependencies

Reduce the number of external dependencies to mitigate frequent update cycles, making Sprout more stable and lightweight.

2. Enhanced Documentation

Provide comprehensive, easy-to-understand documentation that covers all functionalities, use cases, and examples to improve the developer experience.

[!TIP] This convention are defined and writed to available here: Official documentation

3. Conventional Function Naming

Establish clear, consistent naming conventions for functions to enhance code readability and maintainability. Unlike Sprig, where function naming varies between camelCase, and snake_case, and similar functions lack consistent prefixing, Sprout will introduce a standardized approach to function naming. This will make the library more intuitive and reduce the learning curve for new users.

[!TIP] This convention are defined and writed to available here: Templating Conventions

4. Reduce memory fingerprint

Aim to minimize memory allocations as much as possible to alleviate the burden on the garbage collector in large-scale applications. By optimizing the way memory is used within the framework, we ensure that Sprout is not only efficient in its functionality but also in its resource consumption. This approach contributes to overall better performance and scalability of applications using Sprout.

5. Native Error Handling

Introduce built-in error handling mechanisms for all functions to ensure that errors are managed gracefully and efficiently.

[!WARNING] An RFC is currently open for feedback and discussion. You can view and participate in the RFC here.

6. Advanced Error Handling Strategy

Implement a custom error handling framework utilizing channels for improved error reporting and handling on the Go side, reducing the risk of template crashes.

7. Expanded Function Set

Add a broader array of functions without imposing limitations, enabling users to accomplish more tasks directly within the framework.

8. Customizable Function Loading

Allow users to customize which functions to load into their runtime environment, preventing unnecessary resource consumption and enhancing performance.

9. Function Aliasing

Enable the creation of aliases for functions outside of the library, providing flexibility and convenience in how functions are accessed and utilized.

10. Function Notices

When you are a middle-app (between sprout and the user how write the template), you need to be careful when you upgrade a template library due to potential breaking changes or deprecated functions. The solution are to embed a notice system in the template library to warn the end-user of a deprecation and let x versions between the deprecation notice and the replacement / removal of the function.

The Path Forward

Achieving these objectives will require a collaborative effort. We're calling on developers, documentation specialists, and anyone passionate about creating a more efficient and user-friendly template function framework to contribute. Whether it's through coding, providing feedback, or contributing to documentation, every bit of help pushes us closer to our goal.

How to Contribute

Interested in contributing? Here's how you can help:

Code Contributions: If you're a developer looking to add new features, improve existing ones, or help with bug fixes, check out our issues section and pick something that interests you. Documentation: Good documentation is key to any project's success. If you have a knack for writing and wish to improve our docs, we'd love to hear from you. Feedback and Ideas: Have ideas on how we can improve Sprout? We're all ears. Open an issue with your suggestions, no matter how big or small.

Conclusion

Migrating to Sprout represents not just the evolution of a framework but a collective journey towards building a more resilient, efficient, and inclusive tool for developers. With your support, we can create something truly special that stands the test of time and serves the needs of the community. Let's grow together! 🌱

42atomys commented 7 months ago

You can now retrieve all informations directly on the documentation site : https://docs.atom.codes/sprout/roadmap-to-sprout-v1.0

andig commented 6 months ago

I don't find the related comment but I'd agree that it would be great to have an org if this should be a long-term evolution of sprig.

42atomys commented 6 months ago

Thanks @andig for suggesting we move the project to an organization. I’m seriously considering it! However, I’m a bit concerned about the potential disruptions it could cause at this early stage of the project, I use features from GitHub Team, and migrate to an organization force to me to repay it. I still open to your inputs 🌱

To manage imports, I’m thinking about setting up a vanity URL (following the doc site, so something like atom.codes/sprout). This will allow us to migrate without disruption in the future. Does that sound like a good interim solution? I’d love to get your feedback with emojis πŸ‘ or πŸ‘Ž!

Your insights are incredibly valuable to me, so please don’t hesitate to share your thoughts!

See you 🌱

andig commented 6 months ago

Does that sound like a good interim solution?

I honestly don't know. It was horrible (but also done very late) for mergo.

42atomys commented 6 months ago

It was horrible (but also done very late) for mergo.

Yes agreed do it too late can be a nightmare and broke a lot of things.

I love vanity for the flexibility that give to maintain transparently from the end devs, but I hate it for the SPOF that can create

ripienaar commented 6 months ago

There has been several renames - mergo, expr, logrus comes to mind immediately - and to be blunt it was all a complete disaster for users, there are no good outcomes from renaming a project.

I'd say this being in a org is a MVP level requirement to avoid the issues we are trying to get away from.

And no, not a vanity url either - a github org.

andig commented 6 months ago

I've claimed https://github.com/go-sprout (sprout is not available). Let me know if you'd like to hand that one over or if there are better ideas.

42atomys commented 6 months ago

I try to takes go-sprout too ahah After few combinations of sprout and go and don't found one, I take "gardenkit" and in future maybe grap other repo to maintain it in a beautiful garden πŸͺ΄

I currently facing to the "pay" issue due to the charge that add for me to double pay the Pro features (for me account and for the org)

42atomys commented 6 months ago

PS: I have finish some part of the default settings of the organization (and launch the sponsor feature because that takes few days)

I also contact GitHub to be able to transfert it without lose the fork reference (for the moment I think is better to keep the fork reference)

andig commented 6 months ago

@42atomys I own go-sprout. I'll invite you and happy to step out :) Invited you as owner.

42atomys commented 6 months ago

Thanks for reserve it @andig πŸ™, do you want to still a member of the org ? This is a problem for you if I change your role to member ?

I hesitate now between have a single org like "go-sprout" and only have sprout in it or have something like more flexible like "gardenkit" and allow us to have more repositories in future (Be the eternal garden of abandoned repositories) 🫠🐐

Your inputs are welcome, this is a little point but important to define where we want to go in long term πŸ’ͺπŸ”₯

andig commented 6 months ago

It's all yours ;) gardenkit sounds nice but is not obvious. I have no further opinion on naming.

42atomys commented 6 months ago

Not a simple choose because that will be definitive!

I put you member, for the moment and see contribution to decide, actually you are an active member in issue discussions 🌱 so thanks you

42atomys commented 6 months ago

UPDATE: I currently waiting for approval of Github for Sponsorship on https://github.com/go-sprout organization to migrate the repository and continue the roadmap πŸš€

42atomys commented 6 months ago

UPDATE: The oraganisation are ready to receive the project πŸŽ‰ https://github.com/go-sprout Thanks again @andig for the reservation !

I will finish the PR #14 to complete all the documentation and migration (estimated this week) to migrate the repository and release the v0.3 as the first stable version on go-sprout/sprout πŸŽ‰ πŸš€

andig commented 6 months ago

I think it would be important to find a small team to maintain this. You're enthusiasm is great- but sooner or later life will happen...

andreynering commented 6 months ago

Thanks for the effort on this project! I'm interested in it as a possible substitute for sprig on Task.

One of the changes I made on slim-sprig, on top of removing external dependencies, was removing all functions related to crypto (crypto.go), because:

  1. I noticed they considerably increased the build time and binary size of the projects that imported sprig.
  2. Most of the functions are not useful at all for a template library. Perhaps I could have kept a couple of them (base64, sha256), but encrypting stuff, generating bcrypt passwords, certificates, etc. are things that 99.99% of the user won't need on a template engine. And the minority that really need them can add them manually.

In short, I advice you to clean non-useful functions from this fork as well.

ripienaar commented 6 months ago

Would agree on removing the crypt stuff, they are not useful

42atomys commented 6 months ago

Hello everyone, I’ll address each point in a single message πŸ’œ

@andig

(...) find a small team to maintain this. You're enthusiasm is great- but sooner or later life will happen...

I completely agree; it's premature to form a team before reaching the first stable version. As the sole maintainer, I'm committed to providing guidance and feedback to everyone until we can establish a team.

@andreynering :

I'm interested in it as a possible substitute for sprig on Task.

Thank you for your interest! I’ll monitor your issue closely at https://github.com/go-task/task/issues/1638 and will respond to any questions there. Please feel free to remind me if necessary!

@andreynering & @ripienaar :

removing the crypt stuff

Regarding issue #14, the remaining cryptographic elements need to be migrated, and I believe including them in a template was a mistake. I am planning to remove them, and see you have the same vision than me.. I think is a good time to think about "future vision"

Request for Feedback πŸ“’

Initially, I envisioned a seamless transition from Sprig to Sprout without any changes. However, I've noticed several aspects that don't align with my vision (such as using panic in template functions instead of handling errors gracefully). I’d like to gather your opinions on the following:

Would you prefer:

andig commented 6 months ago

I'd be happy with 2. No point in doing 1 if that's not the long-term intention.

caarlos0 commented 6 months ago

I'd vote for 2 as well

ripienaar commented 6 months ago

Vote for 2

andreynering commented 6 months ago

I'd vote for 2, but it's important to keep in mind that we should keep compatibility where possible, and only change what makes sense. The easier it is to migrate, the better.

42atomys commented 6 months ago

@andreynering, I agree with your points, this is my main objective to have an easy way to migrate for everyone.

Here's my plan concerning the "crypto" functionality, which I'll refer to humorously as "the C word" :trollface:. I intend to ensure it remains compatible by not enabling it by default. This approach allows users who rely on it in Sprig to continue using it in Sprout as well without impact all devs performance. I don't have a clear vision of who I will do that but I think about it

To facilitate this transition and maintain backward compatibility, I've implemented an alias feature, which you can find more about in our documentation on function aliases. You can also view an example of a backward compatibility alias here.

Additionally, I'm planning to introduce a Loader Feature in v1. This will allow developers to selectively load only the functions they need, rather than all functions by default.

If there are any other considerations we should discuss πŸ’œπŸŒ±

42atomys commented 6 months ago

UPDATE: I'm currently drafting a roadmap for out v1 with migration steps from Sprig and will be opening multiple discussions in the coming days and weeks. This will allow us to exchange ideas in a RFC format or through solution proposals.

I look forward to your contributions and insights! πŸ’œπŸŒ±

ripienaar commented 6 months ago

There are a number of crypt functions using out of date, deprecated and dangerous alogrithms, its not responsible to keep these due to backward compat concerns.

42atomys commented 6 months ago

UPDATE: The project has found its permanent home at https://github.com/go-sprout/sprout 🌱 πŸš€

andig commented 6 months ago

Love the logo 😘

42atomys commented 6 months ago

Thanks @andig! I made it myself. Pixel art is a passion of mine, and the Gopher on it is really fun!

42atomys commented 6 months ago

UPDATE: First RFC of the project about Function Loader available here https://github.com/orgs/go-sprout/discussions/31

42atomys commented 1 month ago

A big milestone have reached !

This is the last big step ! v0.6.0 are now align with sprout vision and v0.7.0 will include few last functions,

[!IMPORTANT] v0.7.0 will be currently estimated by the end of September !

Maybe v0.7.0 will be named v1.0.0 πŸ‘€

Update from sprig

The Helm team will take a few sprints to quickly update Sprig, ensuring that it doesn't impact Sprout. We’ve decided to unlink Sprout and Sprig (as a fork). Don’t worry, we are still aligned on functionality at this time, and no breaking changes are scheduled for v1.0.0 πŸ’œ

Thanks for your support !

42atomys commented 4 weeks ago

The milestone have reached !

v0.7.0 never existed, but the first release candidate of v1.0.0 is here! Read the full release since the fork here. This is awesome! Huge thanks to everyoneβ€”just one step left: let's validate the candidate!

Fun Fact: the v1.0.0 milestone has 42 items. I swear I didn't plan that!

Special thanks

Special thanks to all of you to trust me and share your ideas and feedback with us! I’ll be starting my journey through your projects to help with the migration. See you on issues!