Currently, the extension deals with file addressing in two ways:
it uses Uris when communicating with the client
it uses Strings internally and when communicating with slicec.
This PR changes this so that the extension uses actual Path and PathBuf objects. (Path is to PathBuf as str is to String)
This change fixes #46, because right now, when we're searching for files, we're using string comparison.
With this change we'll use path comparisons, which account for things like ./hello == hello and mystuff\foo == mystuff/foo, which obviously string comparison didn't handle.
The real problem is we were using a mix! find_file did path comparison, but files.get(..) did string comparison.
Now we only use path comparisons.
Of course, this change also lets us simplify some function changes, and makes find_file unnecessary
(most of it was first converting strings to paths, but now we just already have paths)
Currently, the extension deals with file addressing in two ways:
Uri
s when communicating with the clientString
s internally and when communicating withslicec
.This PR changes this so that the extension uses actual
Path
andPathBuf
objects. (Path is to PathBuf as str is to String)This change fixes #46, because right now, when we're searching for files, we're using string comparison. With this change we'll use path comparisons, which account for things like
./hello
==hello
andmystuff\foo
==mystuff/foo
, which obviously string comparison didn't handle.Of course, this change also lets us simplify some function changes, and makes
find_file
unnecessary (most of it was first converting strings to paths, but now we just already have paths)