Skip to content

Conversation

@askazakov
Copy link
Contributor

simplify template.json

@timcassell
Copy link
Collaborator

Templates were updated in #2338. Is this still relevant? Also, what does coalesce do? I'm not familiar with the templates. @askazakov cc @YegorStepanov

@timcassell timcassell requested a review from YegorStepanov July 19, 2023 06:50
@askazakov
Copy link
Contributor Author

askazakov commented Jul 19, 2023

Templates were updated in #2338. Is this still relevant? Also, what does coalesce do? I'm not familiar with the templates. @askazakov cc @YegorStepanov

Yes, it is still relevant. It's nothing but refactoring. Try to do a little bit more clean code.

Docs for coalesce is here https://github.com/dotnet/templating/wiki/Available-Symbols-Generators#coalesce (in short coalesce behaves like the C# ?? operator)

pr logic is something like

  • framework either set via parameters or empty by default
  • frameworkDefault depends only on app type (console or not)
  • frameworkValue = framework ?? frameworkDefault (if framework is set then use it's value, otherwise use frameworkDefault accordingly app type)
@askazakov askazakov force-pushed the use-coalesce-for-template branch from 237dbad to db482b4 Compare July 19, 2023 07:15
@askazakov
Copy link
Contributor Author

@timcassell
Copy link
Collaborator

Yegor is currently busy, he should be available to review this soon.

@askazakov
Copy link
Contributor Author

@timcassell
Copy link
Collaborator

@AndreyAkinshin Perhaps you could give this a look if @YegorStepanov isn't around?

@AndreyAkinshin AndreyAkinshin requested review from AndreyAkinshin and removed request for YegorStepanov October 5, 2023 13:27
@AndreyAkinshin AndreyAkinshin force-pushed the use-coalesce-for-template branch from db482b4 to 86913d1 Compare October 5, 2023 13:37
@AndreyAkinshin AndreyAkinshin merged commit 00628ab into dotnet:master Oct 5, 2023
@AndreyAkinshin AndreyAkinshin added this to the v0.13.9 milestone Oct 5, 2023
@AndreyAkinshin
Copy link
Member

@askazakov thanks for the PR and sorry for such a late merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants