Open Pzixel opened 5 years ago
Do the CustomAdditionalCompileInputs
items get fed into the compiler, or simply trigger msbuild's incremental build to run the CoreCompile
target? I'm trying to understand why changing the .sol file would lead to a different result in the code generation result.
@AArnott no, they aren't fed to the compiler directly, I rather use them in my generator. I was author of the assembly-level generators if you recall. Here is an example https://github.com/Pzixel/Solidity.Roslyn
This one generates C# classes from sol
file. Thus when you change sol
you indeed change generator input and it has to regenerate stuff.
OK, that makes sense. I won't get time for much or any OSS work over the next couple weeks, so if this is urgent, or if you just feel like contributing, I'd welcome a PR.
I tried to fix this with VS guys but it seems that it's only related to the CodeGeneration.Roslyn
. See https://github.com/dotnet/project-system/issues/5621#issuecomment-557228622 for details.
I think I'l try to manage to get some time in near future but I wonder what changes could be done without being rejected (e.g. because I invalidate caches too much).
My code generator has addiitonal inputs beside C# files. So I add
to the project. VS correctly starts build when file gets edited, but
CodeGenerator.Roslyn
doesn't regenerate files. I only seeBut resulting C# code doesn't reflect actual changes. Only when I rebuild the whole project I get correct results.