You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched issues to ensure it has not already been reported
Cake runner
Cake .NET Tool
Cake version
3.0.0
Operating system
Windows
Operating system architecture
64-Bit
CI Server
No response
What are you seeing?
I would like to enable this feature to see if we can take off a few minutes per build.
For now I would like to add a script cache per project (e.g. %temp%/cake-build/cache/my-project). This value will be set via an environment variable.
However, I checked the code and noticed that only the main script will be used for hash calculation. This means that if I change any of the "included files", the hash will not change.
In our case, we have several scripts that we include with this:
#l "./deployment/cake/tasks.cake"
Unfortunately, this file includes a lot of new includes, so I think there are a few options here:
Pre-process the script by parsing all the includes and use this to generate a hash for the "full script"
Cons: might be a bit slower
Pros: reliable script cache hash
Allow configuration of directories to include in the scripts
Cons: more configuration (but we can automate / use environment variable)
Pros: less "pre-processing", so "faster"
What is expected?
N/A
Steps to Reproduce
N/A
Output log
No response
The text was updated successfully, but these errors were encountered:
At the point in the code you are linking to the script is the complete script with all of the processing done. The ScriptRunner class calls the script analyzer which processes the script.
I currently use the caching on my projects and I use the #load to load a custom recipe we use. We use a nuget package for the recipe so technically if we change the external files the main script will also change for the version change. But for testing I go in and change the files in the cake tools folder where the nuget package exists and the changes are picked and the cached assembly is updated.
Prerequisites
Cake runner
Cake .NET Tool
Cake version
3.0.0
Operating system
Windows
Operating system architecture
64-Bit
CI Server
No response
What are you seeing?
I would like to enable this feature to see if we can take off a few minutes per build.
For now I would like to add a script cache per project (e.g. %temp%/cake-build/cache/my-project). This value will be set via an environment variable.
However, I checked the code and noticed that only the main script will be used for hash calculation. This means that if I change any of the "included files", the hash will not change.
In our case, we have several scripts that we include with this:
Unfortunately, this file includes a lot of new includes, so I think there are a few options here:
Pre-process the script by parsing all the includes and use this to generate a hash for the "full script"
Cons: might be a bit slower
Pros: reliable script cache hash
Allow configuration of directories to include in the scripts
Cons: more configuration (but we can automate / use environment variable)
Pros: less "pre-processing", so "faster"
What is expected?
N/A
Steps to Reproduce
N/A
Output log
No response
The text was updated successfully, but these errors were encountered: