-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot reimport project after settings change #457
Comments
wisechengyi
pushed a commit
that referenced
this issue
Dec 19, 2019
Before this commit, the list of the targets were stored in `PantsProjectSettings::myTargetSpecs` field. Unfortunately, this list was based on the contents of `myTargetSpecsBox` widget, which was cleared each time when the "Pants->Settings" window was opened. As a result, the list of targets was cleared each time during settings save. The fix to this is just not to clean the list of targets in the window. But this led to a new issue. When the list of targets is presented to the user, it's also possible for him to deselect target. During save, the `myTargetSpecs` variable was based on the list of selected targets, so after deselection and save, it was not possible to select it again. In order to overcome this, I put two lists to `PantsProjectSettings` instead of `myTargetSpecs`: 1. `allAvailableTargetSpecs` - used to build `myTargetSpecsBox` widget 2. `selectedTargetSpecs` - to inform `pants` which targets it should operate on fixes #457
wisechengyi
pushed a commit
that referenced
this issue
Jan 14, 2020
CHERRY-PICK This commit is a slightly modified cherry-pick of 58d0b40. 58d0b40 has been already merged, but #471 has been submitted and 58d0b40 Compared to 58d0b40, in this commit, the "cleanPantsProjects" method is not called in PantsUtil.refreshAllProjects, but in PantsSystemProjectResolver.resolveProjectInfo, and it's renamed to "cleanPantsModules". The problem is that, the "refreshAllProjects method was not called each time the reimport occured, it was executed only when the user clicked Pants->Refresh Pants Projects in menubar ORIGINAL MESSAGE Before this commit, the list of the targets were stored in `PantsProjectSettings::myTargetSpecs` field. Unfortunately, this list was based on the contents of `myTargetSpecsBox` widget, which was cleared each time when the "Pants->Settings" window was opened. As a result, the list of targets was cleared each time during settings save. The fix to this is just not to clean the list of targets in the window. But this led to a new issue. When the list of targets is presented to the user, it's also possible for him to deselect target. During save, the `myTargetSpecs` variable was based on the list of selected targets, so after deselection and save, it was not possible to select it again. In order to overcome this, I put two lists to `PantsProjectSettings` instead of `myTargetSpecs`: 1. `allAvailableTargetSpecs` - used to build `myTargetSpecsBox` widget 2. `selectedTargetSpecs` - to inform `pants` which targets it should operate on fixes #457
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Intellij 2019.3
Pants plugin commit c44af98
Repro steps:
Expected result:
Succsessful reimport of the project
Actual result:
Message: "No target roots found in build graph. Please make sure Pants export version >= 1.0.9"
The text was updated successfully, but these errors were encountered: