Like ResourcePath.from_file_path, but accounting for symlinks.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reading ResourcePath.from_file_path and the callers identified in the issue, including PackageDev and AutomaticPackageReloader. Define the new lookup's behavior around symlinked external paths and multiple matching resource paths, then verify that it returns every resource path pointing to the same file without disrupting infrequent use.
Written by the indexing model from the issue text.
Description
Several packages, including PackageDev and AutomaticPackageReloader, try to determine the resource path of a file path supplied via view.file_name() or some other “external” source. ResourcePath.from_file_path can't do this reliably because it only looks at the syntax of the path, so that if the argument is a path elsewhere in the filesystem that's symlinked under Packages, then ResourcePath.from_file_path won't find it.
It might be convenient to provide a function to reliably return all resource paths that point to the same file as a given file path. (There may be more than one such resource path.) I don't think there's any faster way than to stat every resource file, which could be slow, but hopefully not disruptively slow if used sparingly.
- Dominant language
- Python
- Stars
- 56
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SublimeText/sublime_lib
-
documentation
Difficulty 3/5 1-2 days Newbie friendliness 35/100
SublimeText/sublime_lib#183 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
SublimeText/sublime_lib#173 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
SublimeText/sublime_lib#164 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
SublimeText/sublime_lib#141 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
SublimeText/sublime_lib#139 · 4 comments ·
All issues in SublimeText/sublime_lib
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100