Skip to content

filewatcher: support relative paths#48335

Merged
jkarneges merged 1 commit intomainfrom
jkarneges/relative-watcher
Apr 29, 2026
Merged

filewatcher: support relative paths#48335
jkarneges merged 1 commit intomainfrom
jkarneges/relative-watcher

Conversation

@jkarneges
Copy link
Copy Markdown
Member

@jkarneges jkarneges commented Apr 29, 2026

I was recently messing around with DomainMap and the routes file watching wasn't working, and after tearing up the carpet it turned out it was because I used a relative path as input. This was breaking the underlying FileWatcher's path comparisons. Currently we always provide an absolute path to DomainMap, but I figure it would be good to update FileWatcher to support relative paths to avoid such surprises. This PR does this by internally canonicalizing the parent path.

@jkarneges jkarneges requested a review from a team April 29, 2026 17:12
Copy link
Copy Markdown
Contributor

@clintjedwards clintjedwards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I had a nickel for the amount of times I wrote something with file paths and then had to go back to fix a really confusing error because of relative paths;

I wouldn't be rich, but I would have a lot of nickels.

@jkarneges jkarneges merged commit 78db26e into main Apr 29, 2026
19 checks passed
@jkarneges jkarneges deleted the jkarneges/relative-watcher branch April 29, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants