Fix Golang windows example - updated README.md test badge markdown.#651
Fix Golang windows example - updated README.md test badge markdown.#651vsvipul merged 6 commits intoactions:mainfrom magnetikonline:fix-golang-windows-example
README.md test badge markdown.#651Conversation
|
FWIW - tested this via a small composite Action I recently put together - noted that the current example doesn't map to a path that actually caches Golang build resources/files under Windows. |
|
Ping @brcrista (calling you out - as saw you on another recent PR!). 😄 |
| - uses: actions/cache@v2 | ||
| with: | ||
| path: | | ||
| %LocalAppData%\go-build |
There was a problem hiding this comment.
Hm, I wonder why this doesn't work. Maybe we are doing variable expansion in the cache action somewhere instead of letting the OS do it.
I think that should change, but I'm fine with documenting the existing behavior for now. @magnetikonline do you have a before/after example I could look at to verify the fix?
There was a problem hiding this comment.
Thanks @brcrista - I'll mock this up in a throwaway repository to show you.
When testing this - as part of https://github.com/magnetikonline/action-golang-cache I was always ending up with a zero byte cache - meaning the go-build path was not being found/hit. After this change, the cache would consistently have some size/volume.
I'll do another mock to show this behaviour.
There was a problem hiding this comment.
Awesome, thank you. That would be useful for tracking the underlying bug as well (I'll file that issue)
|
Hello 👋 @brcrista. I finally got around to putting together a POC to prove this change is needed. See here: https://github.com/magnetikonline/golang-win-cache-test
See action runs of working/broken. Also see screenshots here: First screen shot shows a restored cache with a sizeable archive size. ☝️ Second screen shot shows a restored cache with no actual content - just a archive file container ( Thanks! Edit: I've also noted that a grep for |
README.md test badge markdown.
|
I'll defer to @vsvipul on this now |
|
Friendly bump @vsvipul 😄 |
vsvipul
left a comment
There was a problem hiding this comment.
Looks like %AppData% is not being correctly expanded to a path where the cache for Go is being stored. Only other place we use this is in deno. @jheysaav You might want to check the windows deno example if this is true for that as well, we can update the docs there as well.
LGTM.


Also some recent 2022 updates(!):
examples.mdTOC once more using https://magnetikonline.github.io/markdown-toc-generate/ 👍