mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-25 06:18:32 +07:00
PyRequirementVisitor used to call listDeclaredPackagesCached() via runBlockingMaybeCancellable, parking a JobScheduler FJ pool thread for the duration of listDeclaredPackages(). Introduce a DependencyCache in PythonPackageManager that publishes an Entry of (dependency files -> modification stamps, background Deferred) keyed by the result of resolveDependencyFilesTree(); concurrent readers share the entry via a Mutex, and a non-blocking listDeclaredPackagesSnapshot() (driven by the Deferred's invokeOnCompletion) lets inspection visitors read packages without suspending. getDependencyFiles/getRootDependencyFile are separated from listDeclaredPackagesCached so file-list readers don't wait on the package compute. Add Pythonid.pyDependenciesFileProvider with one provider per PyDependenciesFile inheritor (setup.py, requirements*.txt, environment.y[a]ml, pyproject.toml, Pipfile.lock), each co-located with its file class; resolve() returns the first non-null match. Promote PipFileLockFile to a data class so the cache's Map.equals on Entry.files matches pipenv entries, and move RequirementsUtil into python-requirements so RequirementsTxtFileProvider can reuse isRequirementsFile. GitOrigin-RevId: e1c10352d1d695be5abda4c02c726d8f62cc8fd1
18 lines
777 B
XML
18 lines
777 B
XML
<idea-plugin visibility="public">
|
|
<dependencies>
|
|
<!-- region Generated dependencies - run `Generate Product Layouts` to regenerate -->
|
|
<module name="intellij.python.community"/>
|
|
<!-- endregion -->
|
|
</dependencies>
|
|
|
|
<extensionPoints>
|
|
<extensionPoint qualifiedName="Pythonid.pyDependenciesFileProvider"
|
|
interface="com.jetbrains.python.requirements.PyDependenciesFileProvider"
|
|
dynamic="true"/>
|
|
</extensionPoints>
|
|
|
|
<extensions defaultExtensionNs="Pythonid">
|
|
<pyDependenciesFileProvider implementation="com.jetbrains.python.requirements.impl.SetupPyFileProvider"/>
|
|
<pyDependenciesFileProvider implementation="com.jetbrains.python.requirements.impl.RequirementsTxtFileProvider"/>
|
|
</extensions>
|
|
</idea-plugin> |