-
Notifications
You must be signed in to change notification settings - Fork 373
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
macros 2.0 #5223
macros 2.0 #5223
Conversation
a487b4c
to
1268485
Compare
1268485
to
83490b1
Compare
@JanKrivanek I would like to kick of the review of this PR, though I'm still working on improving the test coverage. The areas of review:
|
src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/MacroProcessor.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. I like the extraction of the common settings/validation code!
I havent look into actual macros in depth (as I didn't expect much changes, other than extracting config and getting rid of repetitive validation ocde) - I will need to do a second pass on those.
src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/MacroProcessor.cs
Outdated
Show resolved
Hide resolved
...icrosoft.TemplateEngine.Orchestrator.RunnableProjects/Abstractions/IGeneratedSymbolConfig.cs
Show resolved
Hide resolved
...Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Abstractions/IGeneratedSymbolMacro.cs
Outdated
Show resolved
Hide resolved
...Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Abstractions/IGeneratedSymbolMacro.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/MacroProcessor.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Macros/BaseGeneratedSymbolMacro.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Macros/BaseMacroConfig.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Macros/BaseMacroConfig.cs
Show resolved
Hide resolved
src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/MacroProcessor.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/MacroProcessor.cs
Outdated
Show resolved
Hide resolved
...Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Abstractions/IGeneratedSymbolMacro.cs
Outdated
Show resolved
Hide resolved
...icrosoft.TemplateEngine.Orchestrator.RunnableProjects/Abstractions/IGeneratedSymbolConfig.cs
Show resolved
Hide resolved
...Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Abstractions/IGeneratedSymbolMacro.cs
Outdated
Show resolved
Hide resolved
f33940e
to
a06754a
Compare
src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Macros/GeneratePortNumberConfig.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Macros/GeneratePortNumberConfig.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Macros/GeneratePortNumberConfig.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Macros/GeneratePortNumberConfig.cs
Show resolved
Hide resolved
af49875
to
6fd6eda
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the changes!
I have only 1 minor naming suggestion, other than that it looks ready to go
src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Macros/BaseGeneratedSymbolMacro.cs
Outdated
Show resolved
Hide resolved
716f958
to
afaaf94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coalesce functionality looks good. I have just some notes to doc
Open tasks:
|
bd6a24b
to
d6d7faa
Compare
d6d7faa
to
91e0ac8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with reverting the changes in the coallesce macro.
Overall looks good!
Co-authored-by: Jan Krivanek <krivanek.j@hotmail.com>
91e0ac8
to
13f1d61
Compare
Problem
Macros are pain point for a while when it comes to refactoring and code understanding.
I struggled a lot to write documentation for them as interfaces were very vague.
Docs effort:
fixes #5028
fixes #4616
Solution
This is
7.0.2xx(?)/8.0.1xx effort.GeneratePort
macro - previously macro was not releasing socket until the macro is run. Now tracking the list of assigned ports instead.coalesce
macro: should fallback value be used when source value is empty string #5028TODO:
null
float
andhex
types are usedChecks:
#nullable enable
to all the modified files ?