Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Find all References does not search in subdirectories #1988

Closed

Description

@PhilipMay

Environment data

  • VS Code version: Version: 1.41.1
  • Extension version (available under the Extensions sidebar): Version: 1.41.1
  • OS and version: macOS 10.15.2
  • Python version (& distribution if applicable, e.g. Anaconda): conda 3.6

When I use the "Find All References" function it seems only to find references in scripts in the same folder. The extension does not seem to look into subdirectories.

Is this known?

Activity

  1. ericsnowcurrently commented on Jan 28, 2020

    @ericsnowcurrently

    Philip May (@PhilipMay), thanks for letting us know about this. Are you using the language server or Jedi (see the "python.jediEnable" setting)? Also, please provide the content of the "Python" output panel and the "Python Language Server" output panel. Thanks!

  2. PhilipMay commented on Jan 30, 2020

    @PhilipMay
    Author

    Jedi is enabled. I think I can not disable it because Microsoft Python Language Server requires a platform that supports .NET Core 2.1 - and I am on macOS.

  3. PhilipMay commented on Jan 30, 2020

    @PhilipMay
    Author

    There is no output in the Python panel. And I do not see a "Python Language Server" output panel.

  4. ericsnowcurrently commented on Jan 30, 2020

    @ericsnowcurrently

    I think I can not disable it because Microsoft Python Language Server requires a platform that supports .NET Core 2.1 - and I am on macOS.

    The Python Language Server supports MacOS.

    There is no output in the Python panel.

    There should be quite a bit of content there (e.g. commands the extension runs to discover Python environments). Let's make sure we're talking about the same thing. In the "View" menu click on "Output". At the top-right of the "OUTPUT" panel that pops up select "Python" in the pull-down menu.

  5. PhilipMay commented on Jan 30, 2020

    @PhilipMay
    Author

    Eric Snow (@ericsnowcurrently) thanks. This here is the output. It only seems to be pylint stuff.

    > /usr/local/miniconda3/envs/optuna/bin/python -m pylint --disable=all --enable=F,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,unused-wildcard-import,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode,E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0107,E0108,E0110,E0111,E0112,E0113,E0114,E0115,E0116,E0117,E0118,E0202,E0203,E0211,E0213,E0236,E0237,E0238,E0239,E0240,E0241,E0301,E0302,E0303,E0401,E0402,E0601,E0602,E0603,E0604,E0611,E0632,E0633,E0701,E0702,E0703,E0704,E0710,E0711,E0712,E1003,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701 --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text ~/develop/git/optuna/optuna/trial.py
    cwd: ~/develop/git/optuna
    > /usr/local/miniconda3/envs/optuna/bin/python -m pylint --disable=all --enable=F,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,unused-wildcard-import,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode,E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0107,E0108,E0110,E0111,E0112,E0113,E0114,E0115,E0116,E0117,E0118,E0202,E0203,E0211,E0213,E0236,E0237,E0238,E0239,E0240,E0241,E0301,E0302,E0303,E0401,E0402,E0601,E0602,E0603,E0604,E0611,E0632,E0633,E0701,E0702,E0703,E0704,E0710,E0711,E0712,E1003,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701 --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text ~/develop/git/optuna/optuna/trial.py
    cwd: ~/develop/git/optuna
    ##########Linting Output - pylint##########
    
    --------------------------------------------------------------------
    Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
  6. ericsnowcurrently commented on Feb 4, 2020

    @ericsnowcurrently

    Thanks, Philip May (@PhilipMay). Would you mind trying with the language server? In your settings.json put "python.jediEnabled": false.

  7. PhilipMay commented on Feb 6, 2020

    @PhilipMay
    Author

    Ok. I turned off jedi.

    This is the output of the Python Language Server:

    [Info  - 9:07:02 PM] Analysis cache path: /Users/mike/Library/Caches/Microsoft/Python Language Server
    [Info  - 9:07:02 PM] Microsoft Python Language Server version 0.5.30.0
    [Info  - 9:07:02 PM] Workspace root: /Users/mike/develop/git/optuna
    [Info  - 9:07:03 PM] GetCurrentSearchPaths /usr/local/miniconda3/envs/optuna/bin/python 
    [Info  - 9:07:03 PM] Interpreter search paths:
    [Info  - 9:07:03 PM]     /usr/local/miniconda3/envs/optuna/lib/python3.6
    [Info  - 9:07:03 PM]     /usr/local/miniconda3/envs/optuna/lib/python3.6/lib-dynload
    [Info  - 9:07:03 PM]     /usr/local/miniconda3/envs/optuna/lib/python3.6/site-packages
    [Info  - 9:07:03 PM] User search paths:
    [Info  - 9:07:09 PM] Initializing for /usr/local/miniconda3/envs/optuna/bin/python
    [Info  - 9:07:09 PM] Analysis caching mode: None.
    

    It still does only find references in scripts in the same folder. The extension does not seem to look into subdirectories.

  8. ericsnowcurrently commented on Feb 6, 2020

    @ericsnowcurrently

    Philip May (@PhilipMay), I'd like to reproduce the problem. What would be the simplest example that would repeat it?

  9. PhilipMay commented on Feb 7, 2020

    @PhilipMay
    Author

    Great thanks Eric Snow (@ericsnowcurrently)

    • clone optuna project: https://github.com/optuna/optuna.git
    • open it in vscode with installed python extension
    • open optuna folder
    • open distributions.py script
    • scroll all the way down to the check_distribution_compatibility function
    • right click function
    • Click "Find All References"
    • click "edit" -> "find in files"
    • fill in check_distribution_compatibility
    • start search
    • see that the search finds way more calls to check_distribution_compatibility then the "Find All References" functionality
  10. ericsnowcurrently commented on Feb 10, 2020

    @ericsnowcurrently

    Philip May (@PhilipMay), thanks for the detailed instructions. I was able to reproduce the behavior you've described and agree it shouldn't be happening. We'll work on fixing the problem. Thanks again for letting us know about it.

  11. PhilipMay commented on Feb 10, 2020

    @PhilipMay
    Author
  12. PhilipMay commented on Feb 16, 2020

    @PhilipMay
    Author

    Any news about this? Did you find the reason?

  13. ericsnowcurrently commented on Feb 19, 2020

    @ericsnowcurrently

    Philip May (@PhilipMay), unfortunately we have not had time to work on this and I'm not sure when it might happen. 😞 If you don't see activity on this in the next few weeks please ping me again.

    Luciana Abud (@luabud)

  14. 4 remaining items

  15. PhilipMay commented on Apr 6, 2020

    @PhilipMay
    Author
  16. MikhailArkhipov commented on Apr 7, 2020

    @MikhailArkhipov

    Looks like #1686 broke it. Before

    image

    With the loop handling when I modify a file AND the file is a loop, then analysis runs on more than one file and it looks that sometimes AddReference does not go to the right place.

  17. jakebailey commented on Apr 7, 2020

    @jakebailey
    Member

    What's interesting is that presumably jedi/rope didn't handle this either, so this seems pretty exceptional.

  18. PhilipMay commented on Apr 8, 2020

    @PhilipMay
    Author

    Alexander Sher (@AlexanderSher) could you please have a look into this issue? Mikhail Arkhipov (@MikhailArkhipov) sais it might be connected to a PR you have been involved. See here: #1686

  19. jakebailey commented on Apr 8, 2020

    @jakebailey
    Member

    Alex is no longer working on this codebase. There's no reason to specifically ping people, we can handle that ourselves.

  20. PhilipMay commented on Apr 8, 2020

    @PhilipMay
    Author

    Alex is no longer working on this codebase. There's no reason to specifically ping people, we can handle that ourselves.

    Great. I am sorry. Did not intend to interfere with your team processes.

  21. PhilipMay commented on May 30, 2020

    @PhilipMay
    Author

    Hi, any updates or progress on this topic?
    Thanks
    Philip

  22. MikhailArkhipov commented on Jun 19, 2020

    @MikhailArkhipov

    0.5.51 in daily channel

  23. PhilipMay commented on Jun 19, 2020

    @PhilipMay
    Author

    So this is fixed - right?

    How to I install this fixed version with VSCode?
    When will it be released officially?

  24. MikhailArkhipov commented on Jun 19, 2020

    @MikhailArkhipov

    LS is updated independently from VS Code. It is already out in daily channel. If all good, we promote to beta and then to stable. Set

    "python.analysis.downloadChannel": "daily"

    then restart. You should get 0.5.51.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions