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

typelevel.g8 #37

Closed
armanbilge opened this issue Jan 1, 2022 · 9 comments · Fixed by #258
Closed

typelevel.g8 #37

armanbilge opened this issue Jan 1, 2022 · 9 comments · Fixed by #258

Comments

@armanbilge
Copy link
Member

Spinning out of #16 (comment).

@armanbilge armanbilge pinned this issue Jan 19, 2022
@armanbilge
Copy link
Member Author

Here's an example g8 template: https://github.com/davenverse/library.g8

@armanbilge
Copy link
Member Author

Another random Discord discussion suggests considering a vanilla GitHub template as an alternative. Actually, I like the template idea.

@rossabaker
Copy link
Member

A g8 template fills in parameters and is sets up a package-aware file structure. GitHub templates were so lacking in my Haskell days, some people were willing to install a JVM just to get g8. g8 is one of Scala's best features!

@valencik
Copy link
Member

I'd like to work on this.
Started playing around with it this past weekend, should have a prototype to share in a day or two.

@armanbilge
Copy link
Member Author

Thank you so much! Super appreciated.

@valencik
Copy link
Member

Ok, an initial attempt is up: https://github.com/valencik/proto-typelevel.g8
You can try it with: sbt new valencik/proto-typelevel.g8

Included:

  • basic IOApp and test using munit-cats-effect
  • only sbt-typelevel for sbt plugins
  • CODE_OF_CONDUCT.md
  • minimal .scalafmt.conf
  • .gitignore

Soon to be included:

  • github workflow files
  • README.md

To go much further I think we need to answer some questions about goals and use case.
I think we should optimize for new library creation and providing an example of current best practices.
Additionally, I think it's easier to delete/remove things you don't want instead of adding them.
So we can perhaps include extras as long as they don't over complicate things and they are commonly used.
Along that front I think it would be worthwhile to add the following:

  • example usage of mdoc
  • example usage of the site generation
  • license headers
  • scalafix set to organize imports

Let me know if any of those strike you as too much.

@armanbilge
Copy link
Member Author

Thanks for all your work on this.

Additionally, I think it's easier to delete/remove things you don't want instead of adding them.

That's a good point. I think so too.

example usage of mdoc
example usage of the site generation

👍 yep these go hand-in-hand :)

license headers

Woops, actually sbt-typelevel enforces these anyway! So we should add them :)

scalafix set to organize imports

I'm interested if there's a convenient way we can upstream this configuration into sbt-typelevel itself.

@rossabaker
Copy link
Member

I gave this a try at https://github.com/http4s/module.g8/tree/proto-http4s. Looking good! I'll upstream anything that isn't an http4sification.

@armanbilge
Copy link
Member Author

Now we just need to update the site! :)

@armanbilge armanbilge linked a pull request Apr 16, 2022 that will close this issue
@armanbilge armanbilge unpinned this issue Apr 18, 2022
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.

3 participants