Fix Windows Absolute Path Parsing and Remove HTTP Assumption#1837
Conversation
ac066ce to
c1d2eee
Compare
|
I have quick comments. The first, and easiest, is that lowercase drive letters should be permitted. The second is that I think that the Unix and Windows logic should be unified so Windows also gains helpful hints like the full URL suggestion. The third is that (imo) it would be preferable to avoid custom WindowsPath parsing and logic. Windows paths are notoriously complicated. Is there a reason why using PathBuf on Windows is not sufficient? Is there a need to recognise windows paths on Unix platforms? It would also be nice if there was a CI job to run windows tests. |
|
Thanks for the feedback; I'll look into it. |
|
Sorry for dropping the ball on this. Just a reminder what needs to be done so that I can quickly jump back in when I find the time:
|
fcdf77c to
e0912ab
Compare
c1d2eee to
07b569a
Compare
98bc4b6 to
527fde8
Compare
There was a problem hiding this comment.
To get this merged, it might be easier to enable windows CI and tests in a follow-up PR. Removing http assumption by itself is an important fix that should not be stuck behind windows. I think we need a proper strategy for writing cross platform tests.
b18fe64 to
b5b5c03
Compare
|
I took another stab at it today and addressed the outstanding review feedback. Moved out the Windows CI stuff to a different branch. @katrinafyi, can you take another look? |
katrinafyi
left a comment
There was a problem hiding this comment.
Looks good, a few small comments.
|
Nice! I've made those changes. It's much cleaner now. Thanks for the quick turnaround. 👍 |
|
Thanks for reviewing @katrinafyi. Went ahead and merged this. @thomas-zahner fyi. |
This commit fixes issue #972 where Windows absolute paths like C:\path were incorrectly parsed as URLs with scheme
C:.I also took that as an opportunity to finaly remove the assumption that non-existent inputs get parsed as HTTP URLs. So an input
foowould previously have been automatically converted tohttp://foo/, which is a bold and mostly incorrect presumption. You can read more about it in the issue here.Key changes in this PR:
Fixes #972 and #1595