-
Notifications
You must be signed in to change notification settings - Fork 53
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
Target Cake.Tool #152
Comments
@RLittlesII I don't think that would be possible right now. |
@AdmiringWorm It isn't possible right now. I have been working on an initiative to port all the dependencies to netstandard1.6. This issue is part of that project. I am close now, I just need to kick the tires on a few addins to make sure the conversion didn't break anything. |
@RLittlesII @AdmiringWorm if we go ahead with this, guidance would likely be to use Cake.Tool, rather than CoreCLR, but I think we should still try to be able to do this. |
@gep13 Correct me if I am wrong. The difference between CoreCLR and Cake.Tool is just the mechanism by which is packaged and delivered? It's still technically the So we are saying that we would only be able to access this through |
@RLittlesII Essentially yes, also Cake.CoreCLR is .NET Core 2, Cake.Tool is NET Core 2.1 (soon also 3.0). If it works with Cake.Tool then it should work with Cake and Cake.CoreCLR too. |
Before we are going to be able to do this, we need to figure out how to fix this: |
or conditionally disable the reporting functionality (of course this means not loading Cake.Issues recipe as well). |
Yes, that would be an option if we could conditionally load adding into the running process, but as it stands, that still isn’t possible. We could try to do something “clever” by making the addin directive itself conditional, but I really don’t like that approach. The contributor who was working on getting RazorLight working has at least responded, so it isn’t a complete dead end, so hopefully that addin will be updated soon. |
Yeah, did some experiments with conditionally loading Cake.Issues.Recipe by trying to use pre-processor if/else statements that I assumed would have been available with Cake 0.35.0. Unfortunately, this was not honored, and it would still load Cake.Issues.Recipe. |
I believe I am right in saying that those if/else statements are outside of the pre-processor logic within Cake, but @patriksvensson @devlead @mholo65 might be able to confirm this. So although a good idea, I don't think that is a route that we can go down 😢 |
If else statements are processed in Roslyn after preprocessor statements are processed. They work on a C# level. Something you could utilize is environment variables which are expanded before directive is processed. So you could switch which version is loaded, even which addin is executed, etc. |
Yes, that's correct. Preprocessor logic is not aware of defines. See issue cake-build/cake#1860 |
@devlead @mholo65 thank you both for the confirmation, this is what I thought. |
If someone get conditional loading to work, we should not implement it here, but upstream in Cake.Issues.Recipe. Beside having the option to toggle individual features, it would also make sense to only load build server integration if running under the specific build server or only loading issue providers which actually are an input file passed. This is cake-contrib/Cake.Issues.Recipe#17. |
@pascalberger thats a fair point! |
This should allow execution of Cake.Recipe using Cake .Net Global Tool.
I am going to go ahead and close this issue out, as I believe we have got most of this figured out. There might be some additional points that come up related to this, but the guts of the work has been completed, and tested and known to work. |
Rather than using loaddependencies, which is causing problems when running on a Mac.
So that Cake.Recipe can load all addins from Cake CoreCLR runner.
The text was updated successfully, but these errors were encountered: