-
Notifications
You must be signed in to change notification settings - Fork 161
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
cache script per file instead of per directory #596
cache script per file instead of per directory #596
Conversation
Thanks, that looks reasonable. The folder concept is a bit complicated in scripting, because e.g. in nuget intellisense handling, package availability in OmniSharp is handled per folder. If I recall correctly, this was also a reason why caching behaves this way. @seesharper do you have any objections to change this? |
Interesting, I did not know about that. I now tested my changes in combination with VSCode/OmniSharp. Usability wise, everything seems to work normal including intellisense for nuget packages. Technically wise, this PR only changes the location of the Temp-Folder content before this PR:
Temp-Folder content after this PR:
|
I have used a custom dotnet-script version including this change for the last 3 months. Debugging and writing (with autocomplete and so on) in VSCode works normal just like before. @filipw can this get merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Could you just rebase this from master and we should be good to go 👍
c236c3b
to
2a098f2
Compare
I rebased it. Thanks |
@filipw Can you take a last look at this. I think it is good to go 👍 |
sorry for the delay - and thanks! |
I would guess that this fixes my issue too #540, but I probably won't get time to check |
Description
Currently only one script per directory is cached.
This PR adds the script file name into the cache directory path, therefore caching scripts per file instead of per directory.
Example:
D:\scriptA.csx
%tmp%\dotnet-script\D\execution-cache\script.dll
%tmp%\dotnet-script\D\scriptA.csx\execution-cache\script.dll
D:\scriptB.csx
%tmp%\dotnet-script\D\execution-cache\script.dll
%tmp%\dotnet-script\D\scriptB.csx\execution-cache\script.dll
Motivation and Context
I would like to benefit from the execution speed up by caching without having to separate every script into its own directory.