You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The merged PR #16005 added support for glob patterns in the watched file support of dev mode. As pointed out in the PR description, this only happens the first time:
One limitation of this implementation is that we look for matching file only the first time. A new file matching the glob pattern won't be watched once devmode is started. Should we look for matching file everytime?
So when Quarkus checks for files changed since the last restart, it won't find any new files matching the glob pattern, because the patterns are not matched again.
For some use cases (e.g. Flyway; see #25256) it would be nice if this limitation could be addressed, which would be the scope of this issue.
Implementation ideas
The current implementation always traverses the file system, when a watched file path isn't found. I think this can be improved by checking if the path even is a pattern (i.e. contains any wildcard characters). This would also slightly improve the status quo, as the tree walking would normally not be performed (I haven't found any uses of glob patterns in Quarkus core). So, also when checking for changes, the file system tree should only be walked for the watched files with glob patterns.
Additionally, I noticed that the glob pattern support doesn't appear to work correctly on Windows. Whenever a Path is constructed from a glob pattern a InvalidPathException is thrown. This requires some fixes to RuntimeUpdatesProcessor.
The text was updated successfully, but these errors were encountered:
Description
The merged PR #16005 added support for glob patterns in the watched file support of dev mode. As pointed out in the PR description, this only happens the first time:
So when Quarkus checks for files changed since the last restart, it won't find any new files matching the glob pattern, because the patterns are not matched again.
For some use cases (e.g. Flyway; see #25256) it would be nice if this limitation could be addressed, which would be the scope of this issue.
Implementation ideas
The current implementation always traverses the file system, when a watched file path isn't found. I think this can be improved by checking if the path even is a pattern (i.e. contains any wildcard characters). This would also slightly improve the status quo, as the tree walking would normally not be performed (I haven't found any uses of glob patterns in Quarkus core). So, also when checking for changes, the file system tree should only be walked for the watched files with glob patterns.
Additionally, I noticed that the glob pattern support doesn't appear to work correctly on Windows. Whenever a
Path
is constructed from a glob pattern aInvalidPathException
is thrown. This requires some fixes toRuntimeUpdatesProcessor
.The text was updated successfully, but these errors were encountered: