mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
PY-79488 Prototype multimodule Poetry project support
Whenever a pyproject.toml file is found in a new IJ project root (without .idea) we register the corresponding root as managed by Poetry in `.idea/poetry.xml` (so called "linking") and then read all pyproject.toml in the project tree setting up the corresponding IJ modules and dependencies between them (so called "syncing"). The changes are persisted in the workspace model cache, there are no additional config files, besides `.idea/poetry.xml`. If a new pyproject.xml module is added to the root of an existing project, we ask user whether its project model should be applied. When a pyproject.toml is then changed in the editor or externally, we either automatically apply the changes (reloading) or ask a user about it, depending on the settings in "Settings | Build, Execution, Deployment | Build Tools". If automatic linking and syncing doesn't work for some reason (e.g. there is no top-level pyproject.toml as in grazie-ml), there are manual actions "Link All Poetry Projects" and "Sync All Poetry Projects". GitOrigin-RevId: 77a480cdf56d45f22c943acbad3a7c20d5eb56a5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5c8fdbc73c
commit
9131e29041
@@ -92,6 +92,9 @@ The Python plug-in provides smart editing for Python scripts. The feature set of
|
||||
|
||||
<pluginSuggestionProvider order="first" implementation="com.jetbrains.python.suggestions.PycharmProSuggestionProvider"/>
|
||||
<postStartupActivity implementation="com.jetbrains.python.sdk.poetry.PoetryPyProjectTomlPostStartupActivity"/>
|
||||
<projectOpenProcessor implementation="com.jetbrains.python.projectModel.poetry.PoetryOpenProcessor"/>
|
||||
<externalSystemUnlinkedProjectAware implementation="com.jetbrains.python.projectModel.poetry.PoetryUnlinkedProjectAware"/>
|
||||
<postStartupActivity implementation="com.jetbrains.python.projectModel.poetry.PoetryProjectAware$PoetrySyncStartupActivity"/>
|
||||
</extensions>
|
||||
|
||||
<projectListeners>
|
||||
@@ -105,6 +108,8 @@ The Python plug-in provides smart editing for Python scripts. The feature set of
|
||||
topic="com.jetbrains.python.packaging.common.PythonPackageManagementListener"/>
|
||||
<listener class="com.jetbrains.python.statistics.PyPackageDaemonListener"
|
||||
topic="com.intellij.codeInsight.daemon.DaemonCodeAnalyzer$DaemonListener"/>
|
||||
<listener class="com.jetbrains.python.projectModel.poetry.PoetryProjectAware$PoetryListener"
|
||||
topic="com.jetbrains.python.projectModel.poetry.PoetrySettingsListener"/>
|
||||
</projectListeners>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
@@ -649,6 +654,8 @@ The Python plug-in provides smart editing for Python scripts. The feature set of
|
||||
<!-- Setting up cross-module dependencies -->
|
||||
<registryKey key="python.detect.cross.module.dependencies" defaultValue="false"
|
||||
description="Try to detect and automatically set-up module dependencies in a multi-module project"/>
|
||||
<registryKey key="python.project.model.poetry" defaultValue="false" restartRequired="true"
|
||||
description="Automatically set up multi-module Poetry projects"/>
|
||||
|
||||
<feedback.idleFeedbackSurvey implementation="com.jetbrains.python.statistics.feedback.PythonJobSurvey"/>
|
||||
<feedback.idleFeedbackSurvey implementation="com.jetbrains.python.statistics.feedback.PythonUvSupportSurvey"/>
|
||||
@@ -1018,6 +1025,9 @@ The Python plug-in provides smart editing for Python scripts. The feature set of
|
||||
<add-to-group group-id="MarkRootGroup" anchor="after" relative-to-action="MarkSourceRoot"/>
|
||||
</action>
|
||||
|
||||
<action id="Python.PoetrySync" class="com.jetbrains.python.projectModel.poetry.PoetrySyncAction"/>
|
||||
<action id="Python.PoetryLink" class="com.jetbrains.python.projectModel.poetry.PoetryLinkAction"/>
|
||||
|
||||
<!--suppress PluginXmlI18n -->
|
||||
<group id="Internal.Python" internal="true" popup="true" text="Python">
|
||||
<!--suppress PluginXmlI18n -->
|
||||
|
||||
Reference in New Issue
Block a user