Repository navigation
Honor legacy :project_roots permission entries
#38916
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -779,7 +779,10 @@ fn parse_special_path(path: &str) -> Option<FileSystemSpecialPath> { | |
| match path { | ||
| ":root" => Some(FileSystemSpecialPath::Root), | ||
| ":minimal" => Some(FileSystemSpecialPath::Minimal), | ||
| ":workspace_roots" => Some(FileSystemSpecialPath::project_roots(/*subpath*/ None)), | ||
| // `:project_roots` shipped before the canonical rename; keep it as an alias. | ||
| ":project_roots" | ":workspace_roots" => { | ||
| Some(FileSystemSpecialPath::project_roots(/*subpath*/ None)) | ||
|
Comment on lines
+783
to
+784
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This changes effective filesystem enforcement for legacy permission profiles, but the added test stops at AGENTS.md reference: AGENTS.md:L112-L118 Useful? React with 👍 / 👎. |
||
| } | ||
| ":tmpdir" => Some(FileSystemSpecialPath::Tmpdir), | ||
| ":slash_tmp" => Some(FileSystemSpecialPath::SlashTmp), | ||
| _ if path.starts_with(':') => { | ||
|
|
||
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.
When a child profile uses
:workspace_rootsto narrow a legacy parent's:project_rootsrule, inheritance retains both map keys because merging happens before this alias is parsed. Both entries then compile to the sameProjectRootstarget, where an inheritedwritebeats the child's equally specificread, leaving the workspace writable despite the documented child override semantics. Normalize the legacy key before profile merging so semantically matching entries override each other.AGENTS.md reference: AGENTS.md:L102-L110
Useful? React with 👍 / 👎.