Uh oh!
There was an error while loading. Please reload this page.
Pass 1 of SilkTouch Scraper - Joint Infrastructure and XML Generation - #559
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| @@ -0,0 +1,6 @@ | |||
| <Project> | |||
| <ItemGroup> | |||
| <AdditionalFiles Include="$(MSBuildThisFileDirectory)silktouch.json" /> | |||
There was a problem hiding this comment.
That seems weird, why do all bindings share this file?
There was a problem hiding this comment.
Changed to use one file per project with an optional "global file" for common config i.e. license header.
Uh oh!
There was an error while loading. Please reload this page.
| "projects": { | ||
| "Silk.NET.Vulkan": { | ||
| "scraper": { | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
have you considered, instead of doing this, doing the configuration in the actual project? like... this seems pointless.
There was a problem hiding this comment.
Changed to use one file per project with an optional "global file" for common config i.e. license header.
Uh oh!
There was an error while loading. Please reload this page.
| namespace Silk.NET.SilkTouch.Configuration | ||
| { | ||
| public static class Config |
There was a problem hiding this comment.
please noMicrosoft.Extensions.Configuration > static class Config
There was a problem hiding this comment.
I don't think that package is applicable here. This is just a simple JSON configuration, we don't have massive infrastructure, extensibility concerns, or anything else that could possibly warrant a dedicated configuration package. I'm all for using smart libraries, but only when we actually need to do smart things. I'm not going to force packages into the codebase where they're not needed.
If you read the code for this particular class, these are just helpers and wrappers for loading configuration to reduce verbosity elsewhere in the codebase. It holds no state whatsoever.
There was a problem hiding this comment.
The Configuration package is tiny and would allow us to use different configuration sources, use configuration sections, etc.
It would allow us to separate the configuration of the different stages entirely, which I think is very desirable.
There was a problem hiding this comment.
The Configuration package in particular doesn't really make much sense outside of the hosting infrastructure or any other scenario where we might abstractions or injection. Moreover, it makes it far less obvious what's actually going on during configuration loading.
We really don't need this at all.
There was a problem hiding this comment.
No change deemed necessary. If this is a requirement please close this PR.
| // the performance is horrible but it's not too much a cause for concern as it is a "fixed cost". | ||
| // definitely improve it in the future though as we do have access to new string(char*), meaning we can | ||
| // come up with a Span-based solution it'll just be very very very verbose. | ||
| if (kvp[0].ToLower().Trim() == "hint" && Enum.TryParse |
There was a problem hiding this comment.
Changed to Equals + IgnoreCase.
| { | ||
| public static class ScraperGenerationExtensions | ||
| { | ||
| public static async ValueTask<bool> RunScraperAsync<T>(this SilkTouchGenerator generator) |
There was a problem hiding this comment.
This doesn't feel very ValueTask to me?
There was a problem hiding this comment.
This has been changed to Task.
| public sealed record SilkTouchContext | ||
| ( | ||
| string AssemblyName, | ||
| IEnumerable<CSharpSyntaxTree> SyntaxTrees, |
There was a problem hiding this comment.
I need a compilation. Without a Compilation Overloads & Emitter probably won't work
There was a problem hiding this comment.
What specifically do you need from the compilation though?
There was a problem hiding this comment.
like the semantic model and stuff?
There was a problem hiding this comment.
Now passing the Compilation to SilkTouchContext.
Perksey
commented
Aug 10, 2021
This is as far as this PR will progress. It is 100% XML documented and has contributor documentation describing the general implementation design. This is ready for review. |
Uh oh!
There was an error while loading. Please reload this page.
| @@ -0,0 +1,6 @@ | |||
| <Project> | |||
| <ItemGroup> | |||
| <AdditionalFiles Include="$(MSBuildThisFileDirectory)silktouch.json" /> | |||
There was a problem hiding this comment.
Changed to use one file per project with an optional "global file" for common config i.e. license header.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| "projects": { | ||
| "Silk.NET.Vulkan": { | ||
| "scraper": { | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Changed to use one file per project with an optional "global file" for common config i.e. license header.
Uh oh!
There was an error while loading. Please reload this page.
| namespace Silk.NET.SilkTouch.Configuration | ||
| { | ||
| public static class Config |
There was a problem hiding this comment.
No change deemed necessary. If this is a requirement please close this PR.
| // the performance is horrible but it's not too much a cause for concern as it is a "fixed cost". | ||
| // definitely improve it in the future though as we do have access to new string(char*), meaning we can | ||
| // come up with a Span-based solution it'll just be very very very verbose. | ||
| if (kvp[0].ToLower().Trim() == "hint" && Enum.TryParse |
There was a problem hiding this comment.
Changed to Equals + IgnoreCase.
| public sealed record SilkTouchContext | ||
| ( | ||
| string AssemblyName, | ||
| IEnumerable<CSharpSyntaxTree> SyntaxTrees, |
There was a problem hiding this comment.
Now passing the Compilation to SilkTouchContext.
| { | ||
| public static class ScraperGenerationExtensions | ||
| { | ||
| public static async ValueTask<bool> RunScraperAsync<T>(this SilkTouchGenerator generator) |
There was a problem hiding this comment.
This has been changed to Task.
Perksey
commented
Aug 27, 2021
This is ready for another review. |
|
HurricanKai
left a comment
There was a problem hiding this comment.
Merging to continue editing
Very very wip
In-scope for this PR
for-contributorsmarkdownfor-contributorsmarkdownOut-of-scope for this PR
for-contributorsmarkdownfor-contributorsmarkdownfor-contributorsmarkdown