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 template-info.yaml #53

Merged
merged 3 commits into from
May 5, 2016
Merged

create template-info.yaml #53

merged 3 commits into from
May 5, 2016

Conversation

eriknstevenson
Copy link
Member

As suggested here and in support of stack pull request #1988.

@3noch
Copy link
Member

3noch commented Apr 4, 2016

Shouldn't the descriptions be part of the template itself? This seems like recipe for confusion, having to do the mapping manually.

@eriknstevenson
Copy link
Member Author

It would be nice to have the descriptions as part of the template files themselves, but would that not require downloading and parsing every template file, every time a user runs stack templates? Granted, they're small files, but I don't see that as being very desirable.

@3noch
Copy link
Member

3noch commented Apr 4, 2016

I guess I assumed stack already did download all the templates anyway. I don't actually know either way.

@mgsloan
Copy link
Contributor

mgsloan commented Apr 4, 2016

Yeah, cloning the template repo would be sensible for many reasons - commercialhaskell/stack#1595.

I don't see much of a problem with having a metadata file like this, though. It might make things clearer if something like template inheritance gets added commercialhaskell/stack#1994

@3noch
Copy link
Member

3noch commented Apr 4, 2016

@mgsloan You have a much better sense of what's good in this case. I just like to keep things DRY and having to join these two "tables" adds complexity.

@mgsloan
Copy link
Contributor

mgsloan commented Apr 4, 2016

@3noch Yeah, the main issue with adding it to the template itself is that it'd be best to have compatibility with older stack versions. So either way, we'll need to add new files. We can either have a template-info file like this, or add a description file per template.

@3noch
Copy link
Member

3noch commented Apr 4, 2016

it'd be best to have compatibility with older stack versions.

@mgsloan For how young stack is, this requirement seems a bit hard to believe (again, you know better than I). I would imagine that stack's adoption rate is very good too.

@mgsloan
Copy link
Contributor

mgsloan commented Apr 5, 2016

We can't just silently make stack new fail for old stack versions. There is no "template repo version check". So our only option would be to make a new repo or a subdir or something.

Overall our backwards / forwards compatibility is extremely good, and we have no reason to sacrifice this.

@3noch
Copy link
Member

3noch commented Apr 5, 2016

There is no "template repo version check". So our only option would be to make a new repo or a subdir or something.

Hmm...perhaps that's the main problem? Without any way to describe changes, you can't safely make any!

I.e. perhaps now's a good time to start something like that so that in the future we're not up a creek again?

I'm just offering thoughts. You guys are doing an amazing job already.

@mgsloan
Copy link
Contributor

mgsloan commented Apr 5, 2016

Yes, something like that would be good for our various sources of data. PRs appreciated

Even with something like that, it seems extreme to flip a switch and disable a feature in all-but-the-newest stack

- Test ensures `template-info.yaml` exactly matches the contents of the repository
- Bump resolver
@eriknstevenson
Copy link
Member Author

As discussed here, testing will now fail if there is any discrepancy between templates listed in template-info.yaml and the actual templates present in the repository.

@3noch
Copy link
Member

3noch commented Apr 8, 2016

@Narrative Now that is a good idea!

@mgsloan
Copy link
Contributor

mgsloan commented May 5, 2016

Oops, forgot to merge this after the stack changes got merged. Thanks again!

@mgsloan mgsloan merged commit e4c4fb1 into commercialhaskell:master May 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants