Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Adds RFC proposal for caching generated assembly #2

Closed
wants to merge 1 commit into from

Conversation

gep13
Copy link
Member

@gep13 gep13 commented Oct 31, 2018

No description provided.

## Unresolved questions
[unresolved-questions]: #unresolved-questions

Don't think there are any.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caching compilation is not alone enough. We must also cache registered tools resolved via #tool directive. Addins (and their dependencies) must also be loaded into app domain / load context in same order as the first time when resolved via #addin directive.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything still runs the same as previously. The script itself is still processed by cake to pickup the #addin's and #tool's. Once this is done and the complete script is generated this is where cake would compile the script to run. At this point it checks to see if a valid cached compile scripted exists. If it does then it runs the cached script.


Two new arguments will be added to the Cake Client.

* Cache - If set true the compiled script will be cached

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could (should) be true by default. Maybe there can be an additional check to check modification time of files against the build time of the cached assembly to determine whether a new build is required.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They wanted this to be opt-in so that is why it was defaulted to false. There is an additional step to determine if the cached assembly is valid. A hash is taken of the final script and that is used to determine if the cache is valid or not.

@gep13
Copy link
Member Author

gep13 commented May 6, 2022

The RFC process is no longer being followed by the Cake project.

This feature was added to Cake in this PR: cake-build/cake#2099

As such, I am going to go ahead and close this PR.

@gep13 gep13 closed this May 6, 2022
@gep13 gep13 deleted the cache-generated-assembly branch May 6, 2022 06:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants