czukowski commented on issue #6039:
URL: https://github.com/apache/netbeans/issues/6039#issuecomment-1642683806

   @junichi11 I think I'm onto something. The issue seems to be related to 
doc-comments parser. It suffices to add a `@return` comment with a 'generic 
type' syntax to freeze "Fix Imports" function, for example: `@return array<int, 
Whatever>`. However, the project size must be large enough so that it has to 
check many classes.
   
   I used Magento for testing. The steps to reproduce are to clone its repo, 
initialize Composer dependencies and then beef it up some more by adding 
additional dependencies known to be rather large (I could tell a difference 
even without additional dependencies but it wasn't so severe):
   
   ```sh
   git clone https://github.com/magento/magento2.git .
   
   composer install
   
   composer require aws/aws-php-sns-message-validator:* facebook/graph-sdk:* 
facebook/php-business-sdk:* google/apiclient:* nikic/php-parser:* phing/phing:* 
php-coord/php-coord:* phpoffice/phpspreadsheet:*
   ```
   
   I searched for a function that returned array and the first file I found was 
`app/code/Magento/ReleaseNotification/Model/ResourceModel/Viewer/Logger.php` 
and its method `loadLatestLogData`. It is probably not very important which 
file or function to use though. At this point, fixing imports worked as it 
should, even if I tried edits resulting in new `use` statements being added. I 
found the following edits to cause the freezes:
   
   - `@return array<int, Whatever>`
   - `@return array<int>`
   - `@return list<int>`
   - `@return Whatever<int>`
   - `@return Whatever<max>`
   - etc
   
   But not this:
   
   - `@return int<0, 100>`
   - `@return int<0, max>`
   - `@return array{int, int}`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to