Skip to content
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

Fix untrusted notifications in Cargo projects #8167

Merged
merged 1 commit into from Nov 29, 2021

Conversation

Undin
Copy link
Member

@Undin Undin commented Nov 24, 2021

Coming versions of IntelliJ IDE (more specifically 2021.2.4 and 2021.3.1) will bring changes in untrusted editor notification.
Now, if a project is opened in safe mode, IDE will show the corresponding editor notification in all files itself. That leads to double editor notification since the plugin shows its own notification as well.

Screen Shot 2021-11-24 at 16 51 58

These changes prepare the plugin for platform changes, and now the editor notification about untrusted project will be shown only once. Also, they fix trust project action in the notification that doesn't work with stable plugin builds because of changes in the platform (TrustChangeNotifier was renamed to TrustStateListener)

changelog: Prepare plugin for upcoming changes in untrusted editor notification

Coming versions of IntelliJ IDE (more specifically 2021.2.4 and 2021.3.1) will bring changes in untrusted editor notification.
Now, if a project is opened in safe mode, IDE will show the corresponding editor notification in all files itself. That leads to double editor notification since the plugin shows its own notification as well.

These changes prepare the plugin for platform changes, and now the editor notification about untrusted project will be shown only once. Also, they fix `trust project` action in the notification that doesn't work with stable plugin builds because of changes in the platform (`TrustChangeNotifier` was renamed to `TrustStateListener`)
@Undin Undin added the internal Pull requests about internal improvements/fixes that don't affect users directly label Nov 24, 2021
@Undin Undin added this to In Progress in To test via automation Nov 24, 2021
@Undin Undin requested a review from vlad20012 November 24, 2021 18:36
Copy link
Member

@mchernyavsky mchernyavsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

bors bot added a commit that referenced this pull request Nov 28, 2021
8167: Fix untrusted notifications in Cargo projects r=mchernyavsky a=Undin

Coming versions of IntelliJ IDE (more specifically 2021.2.4 and 2021.3.1) will bring changes in untrusted editor notification.
Now, if a project is opened in safe mode, IDE will show the corresponding editor notification in all files itself. That leads to double editor notification since the plugin shows its own notification as well.

<img width="782" alt="Screen Shot 2021-11-24 at 16 51 58" src="https://user-images.githubusercontent.com/2539310/143281497-36fbe0c7-62cc-47df-a3f5-9090289b02d7.png">


These changes prepare the plugin for platform changes, and now the editor notification about untrusted project will be shown only once. Also, they fix `trust project` action in the notification that doesn't work with stable plugin builds because of changes in the platform (`TrustChangeNotifier` was renamed to `TrustStateListener`)



changelog: Prepare plugin for upcoming changes in untrusted editor notification


Co-authored-by: Arseniy Pendryak <a.pendryak@yandex.ru>
@bors
Copy link
Contributor

bors bot commented Nov 28, 2021

Build failed:

@Undin
Copy link
Member Author

Undin commented Nov 28, 2021

bors retry

bors bot added a commit that referenced this pull request Nov 28, 2021
8167: Fix untrusted notifications in Cargo projects r=mchernyavsky a=Undin

Coming versions of IntelliJ IDE (more specifically 2021.2.4 and 2021.3.1) will bring changes in untrusted editor notification.
Now, if a project is opened in safe mode, IDE will show the corresponding editor notification in all files itself. That leads to double editor notification since the plugin shows its own notification as well.

<img width="782" alt="Screen Shot 2021-11-24 at 16 51 58" src="https://user-images.githubusercontent.com/2539310/143281497-36fbe0c7-62cc-47df-a3f5-9090289b02d7.png">


These changes prepare the plugin for platform changes, and now the editor notification about untrusted project will be shown only once. Also, they fix `trust project` action in the notification that doesn't work with stable plugin builds because of changes in the platform (`TrustChangeNotifier` was renamed to `TrustStateListener`)



changelog: Prepare plugin for upcoming changes in untrusted editor notification


Co-authored-by: Arseniy Pendryak <a.pendryak@yandex.ru>
@bors
Copy link
Contributor

bors bot commented Nov 28, 2021

Build failed:

@mchernyavsky
Copy link
Member

bors retry

bors bot added a commit that referenced this pull request Nov 28, 2021
8167: Fix untrusted notifications in Cargo projects r=mchernyavsky a=Undin

Coming versions of IntelliJ IDE (more specifically 2021.2.4 and 2021.3.1) will bring changes in untrusted editor notification.
Now, if a project is opened in safe mode, IDE will show the corresponding editor notification in all files itself. That leads to double editor notification since the plugin shows its own notification as well.

<img width="782" alt="Screen Shot 2021-11-24 at 16 51 58" src="https://user-images.githubusercontent.com/2539310/143281497-36fbe0c7-62cc-47df-a3f5-9090289b02d7.png">


These changes prepare the plugin for platform changes, and now the editor notification about untrusted project will be shown only once. Also, they fix `trust project` action in the notification that doesn't work with stable plugin builds because of changes in the platform (`TrustChangeNotifier` was renamed to `TrustStateListener`)



changelog: Prepare plugin for upcoming changes in untrusted editor notification


Co-authored-by: Arseniy Pendryak <a.pendryak@yandex.ru>
@bors
Copy link
Contributor

bors bot commented Nov 28, 2021

Build failed:

@Undin
Copy link
Member Author

Undin commented Nov 29, 2021

bors r=mchernyavsky

@bors
Copy link
Contributor

bors bot commented Nov 29, 2021

Build succeeded:

@bors bors bot merged commit 792f6c9 into master Nov 29, 2021
To test automation moved this from In Progress to Test Nov 29, 2021
@github-actions github-actions bot added this to the v161 milestone Nov 29, 2021
@mili-l mili-l self-assigned this Nov 29, 2021
@Undin Undin deleted the undin/fix-double-untrusted-notification branch November 30, 2021 05:47
@mili-l mili-l moved this from Test to Done in To test Nov 30, 2021
bors bot added a commit that referenced this pull request Dec 24, 2021
8018: UI: Add a widget and some notifications for external linter r=vlad20012 a=mchernyavsky

<img width="351" alt="Screenshot 2021-11-12 at 02 18 21" src="https://user-images.githubusercontent.com/6079006/141382780-e61f516c-f0f4-4ea0-ab45-2dec18c8fb86.png">

<img width="385" alt="Screenshot 2021-11-12 at 04 02 08" src="https://user-images.githubusercontent.com/6079006/141390897-ccc37321-ab2b-4b92-b37d-a0e6c43260b2.png">

<img width="357" alt="Screenshot 2021-11-12 at 02 20 45" src="https://user-images.githubusercontent.com/6079006/141382787-eeb1460e-9e41-494e-8099-01a73ca5e81e.png"> <img width="357" alt="Screenshot 2021-11-12 at 02 20 26" src="https://user-images.githubusercontent.com/6079006/141382784-a40a0523-5d9d-4642-afd5-01f88ef34957.png">

Also, see `org.rust.external.linter.max.duration` registry option.


changelog: Add a widget for the external linter and notify a user about the linter is turned on/off or if the linter significantly affects performance on the project


8269: INT: correctly parenthesize block-like expressions in Inline Value refactoring r=vlad20012 a=Kobzol

Turns out that I have missed a few cases that require parentheses in `RsInlineValueProcessor`.

Fixes: #8267

changelog: Correctly parenthesize block-like expressions (e.g. `match`) in Inline Value refactoring.

8332: Update ra_ap_proc_macro_srv to 0.0.87 r=vlad20012 a=vlad20012

... and enable Dependabot.

Previous - #8278


8334: Don't perform cargo refresh when another IDE project become trusted r=vlad20012 a=vlad20012

The bug was introduced in #8167. When some IDEA project is marked as trusted, `cargo refresh` action is performed in all other opened projects. This also lead to flaky tests

https://user-images.githubusercontent.com/3221931/147363985-9ea94a7a-6449-4f96-bdeb-4a17d1f84124.mp4




Co-authored-by: Mikhail Chernyavsky <mikhail.chernyavsky@jetbrains.com>
Co-authored-by: Jakub Beránek <berykubik@gmail.com>
Co-authored-by: vlad20012 <beskvlad@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Pull requests about internal improvements/fixes that don't affect users directly
Projects
To test
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants