sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Allow share template name for different languages

Open kant2002 opened this issue 3 years ago • 5 comments

Is your feature request related to a problem? Please describe.

I writing templates for F* language which provide exporting to F#. I want make consuming F* programs in .NET ecosystem to be as easy as possible. So I create template https://github.com/kant2002/fstarmsbuildsdk and by mistake do not change short template for template, but do change

  1. Package identity
  2. Language

Currently when I run dotnet new console --lang F* I receive following error message

Unable to resolve the template, the following installed templates are conflicting:
Identity                  Template Name  Short Name  Language  Author         Package

------------------------  -------------  ----------  --------  -------------  --------------------------------------------
FStarLang.Common.Console  Console App    console     F*        Andrii Kur...  FStarLang.DotNet.Common.ProjectTemplates.1.0
Microsoft.Common.Console  Console App    console     C#,F#,VB  Microsoft


Uninstall the template packages containing the templates to keep only one template from the list or add the template options which differentiate the template to run.

Describe the solution you'd like

Would be good that package resolution would take into account switch --lang here and resolve template not only on short name, but on short name + language.

Additional context

Other languages which may benefit from this

  • C compiler for .NET https://github.com/fornever/cesium
  • Zig probably https://github.com/vezel-dev/zig-sdk
  • IronXXX family.
  • Pascal.ABC http://pascalabc.net/en/

kant2002 avatar Aug 16 '22 15:08 kant2002