Repository navigation
fix: avoid infinite recursion on imported directories - #15596
Conversation
|
Looks good but could use a test |
|
|
@javier-godoy @Artur- I added a couple of tests and also made a patch for an issue when importing a directory whose |
|
Kudos, SonarCloud Quality Gate passed!
|
Artur-
left a comment
There was a problem hiding this comment.
Can't say I fully understand what is happening in the code but it is not because of this PR.
After running one of the tests, the visitedImports set contains
"theme/myTheme/directory/sub1.js"
"/var/folders/3r/3_0g1bhn44j1vvvpfksrz1z40000gn/T/junit17400761833385662199/frontend/src/directory/index.js"
"theme/myTheme/directory"
"/var/folders/3r/3_0g1bhn44j1vvvpfksrz1z40000gn/T/junit17400761833385662199/frontend/src/main-template.js"
"/var/folders/3r/3_0g1bhn44j1vvvpfksrz1z40000gn/T/junit17400761833385662199/frontend/src/directory/sub1.js"
So it is some kind of mix between import strings and absolute paths...
|
Hi @javier-godoy and @mcollovati, when i performed cherry-pick to this commit to 23.3, i have encountered the following issue. Can you take a look and pick it manually? |
|
Hi @javier-godoy and @mcollovati, when i performed cherry-pick to this commit to 23.2, i have encountered the following issue. Can you take a look and pick it manually? |
|
There are missing cherry-picks of #15005 on 23.2, 9.0 and 2.8 that should be applied before picking this change |
|
This ticket/PR has been released with Vaadin 24.0.0.alpha10 and is also targeting the upcoming stable 24.0.0 version. |








Close #15595
Description
The check of whether the file has already been visited should be done after converting a directory to
directory/index.jsbygetImportedFrontendFile(#15023). Otherwise,directorywould never be found invisitedPath, and it will enter infinite recursion.flow/flow-server/src/main/java/com/vaadin/flow/server/frontend/AbstractUpdateImports.java
Lines 631 to 639 in 444befa
Type of change
Checklist
Additional for
Featuretype of change