Save/Apply context loop results in no valid paths
I'm on windows if it matters. When I add the entire docs folder to my context, then save the context to the context json I get the following entry with a single path representing a directory:
{
"name": "docs-folder",
"paths": [
"docs"
]
}
When I attempt to apply this context from the json file I am told no valid paths are found.
As I'm unable to reproduce on linux: does it work on other root directories in your project? Are you using multi-root folder workspace?
It does not work on other root directories, nor does it work on other non-root directories, anything that is not a concrete file path fails to be detected.
I'm not using the project as a "workspace" i've opened it as a folder from the repository root, so my immediate children include /packages and /docs
I will attempt to diagnose on my end and see if I provide a root cause or PR, but it may take a few days
It sounds like OS issue. On it.
Thanks for the bug report!
Should be now fixed in 1.114.0, please let me know if all is fine now on your end.
Unfortunately this isn't resolved.
I've modified an existing saved context to create this context:
"name": "Foo",
"paths": [
"docs\\context",
"docs\\plans\\00001-remove-events",
"docs\\plans\\templates",
"docs\\readme.md"
]
this has 1 file "readme,md" and 2 subdirectories "context", and "plans". context contains files and plans contains two subdirectories which contain files.
When i restore this context i get a message that the context is successfully applied, however the only context is the docs\readme.md file.
I've also tried changing from
"docs\\context"
to each of these
"docs/context"
"docs\\context\\*"
"docs\\context\\**"
"docs\\context\\*.*"
"\\docs\\context\\*"
"\\docs\\context\\**"
"\\docs\\context\\*.*"
to see if the glob pattern characters would result in files being selected without success.
as a workaround I am having success with opening the files and using the VSCode built in feature of selecting all open editor windows and copying the relative path for each and manually adding them to a context, but this has additional overhead when new files are added to a directory, thankfully this is fairly infrequent for my use case.
I can see we need to normalize saved paths on windows to use forward slashes. On it.
Please verify if things are working in 1.123.0
I've used the save context feature to create a new context and it is saved with the correct slashes:
{
"name": "Docs",
"paths": [
"src/Admin.Web.Storybook/docs/test-product-requirements.md",
"src/Admin.Web.Storybook/README.md",
"src/Admin.Web/docs", <------------ this is a directory
"src/Admin.Web/README.md",
"README.md"
]
}
The entry "src/Admin.Web/docs", is a directory with the following structure
When I use the apply context feature the concretely referenced files are applied to the context correctly:
"src/Admin.Web.Storybook/docs/test-product-requirements.md",
"src/Admin.Web.Storybook/README.md",
"src/Admin.Web/README.md",
"README.md"
Unfortunately the directory "src/Admin.Web/docs" and its subdirectories and files are not
I'm able to reproduce it and I'm working on a fix. Until it is fixed, you can work in WSL, if you can.
Hi, thanks for your patience! This should be now fixed in 1.137.0.