-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Fall back to co-location heuristic if sourcemap url appears remote #1871
base: master
Are you sure you want to change the base?
Fall back to co-location heuristic if sourcemap url appears remote #1871
Conversation
a17bef2
to
e1909e6
Compare
…e a remote path Fixes getsentry#1870.
e1909e6
to
50a4008
Compare
/// particularly in the case of static asset collection and hosting, | ||
/// but such a path is very unlikely to exist in the local filesystem. | ||
fn is_url_path(url: &str) -> bool { | ||
url.starts_with('/') && !Path::new(url).exists() |
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.
As far as I know, path.exists()
makes a system call. Can we avoid having validation only filesystem calls, and also achieve the same result of is_url_path
purpose? Path::new(url).is_absolute()
for example?
@@ -247,6 +247,19 @@ fn is_remote_url(url: &str) -> bool { | |||
}; | |||
} | |||
|
|||
/// Return true iff url appears to be a URL path. |
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.
/// Return true iff url appears to be a URL path. | |
/// Return true if url appears to be a URL path. |
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
This is still on my todo list. |
...but the stalebot did not remove the label. 🤔 |
I removed "Status: Stale" and added "Status: In Progress." Hopefully StaleBot leaves the PR alone going forward |
Applies a heuristic to guess that a sourcemap URL is a remote URL path (without scheme and domain):
/
Fixes #1870.