Skip to content

Namespaced templates #4039

Closed
Closed
@snoyberg

Description

@snoyberg

Problem There is no clear criteria right now for which templates should be included in the stack-templates repo. No one person has control over this repo, making it difficult for tutorial authors to rely on it in their documentation. The output of stack templates can be overwhelming.

Proposed solution Introduce namespacing into the template concept. There definitely room to modify this, but as an initial proposal that keeps backwards compatibility, let's consider:

  • A template name github:username/template can be found on the repo https://github.com/username/stack-templates, on the master branch, in the file template.hsfiles
  • The github: leader is for future proofing, if someone wants to add support for Gitlab, Bitbucket, or others
  • If github: is left off, it is filled in automatically, so that username/template is treated as github:username/template
  • Similarly, if the username namespacing is left off, e.g. template, the assumed username is commercialhaskell, falling back to the current behavior

Then, as an example, the Yesod templates could end up being referred to as yesodweb/postgres, etc.

To deal with the overwhelming output from stack templates: what if we have a README.md or similar file in commercialhaskell/stack-templates which is downloaded and displayed to the user explaining a few of the common templates, and then pointing to a Wiki page or similar where people can share more templates.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions