-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Milestone
Description
Problem
The current implementation of the StaticPaths method in the analyzer group doesn't properly handle post-analyzers that implement the StaticPathAnalyzer interface. This can lead to inefficient file system traversal when post-analyzers could provide static paths.
Current Behavior
- Post-analyzers are not considered when determining static paths
- Even if all post-analyzers implement
StaticPathAnalyzer, the method returnsfalseforallStatic - This forces unnecessary file system traversal
Expected Behavior
- Post-analyzers that implement
StaticPathAnalyzershould be considered when determining static paths - If all enabled analyzers (including post-analyzers) implement
StaticPathAnalyzer,allStaticshould betrue - This would allow for more efficient file system traversal
Steps to Reproduce
- Create a post-analyzer that implements
StaticPathAnalyzer - Enable the post-analyzer
- Call
StaticPathson the analyzer group - Observe that the post-analyzer's static paths are not included
Impact
- Unnecessary file system traversal
- Reduced performance
- Inconsistent behavior between analyzers and post-analyzers
Proposed Solution
- Modify the
StaticPathsmethod to consider both analyzers and post-analyzers - Update the logic to check if all enabled analyzers (including post-analyzers) implement
StaticPathAnalyzer - Include static paths from post-analyzers in the returned paths
Related PRs
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Type
Projects
Status
No status