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

MACRO: more consistency checks #5500

Merged
merged 2 commits into from
Jun 4, 2020
Merged

MACRO: more consistency checks #5500

merged 2 commits into from
Jun 4, 2020

Conversation

vlad20012
Copy link
Member

@vlad20012 vlad20012 commented Jun 4, 2020

We still have some unexplained bugs in the macro expansion engine. E.g. false-positive "Use of moved value" for i32 - this can be explained by unexplained disappearing of macro expansions =/
I failed to investigate it, so I just add more asserts, more logs and do more attempts to recover things if something got wrong. Maybe we'll catch the reason later.

@Undin Undin self-requested a review June 4, 2020 14:26
@vlad20012 vlad20012 added the fix Pull requests that fix some bug(s) label Jun 4, 2020
@vlad20012 vlad20012 added this to the v124 milestone Jun 4, 2020
@vlad20012
Copy link
Member Author

bors r+

bors bot added a commit that referenced this pull request Jun 4, 2020
5500: MACRO: more consistency checks r=vlad20012 a=vlad20012

We still have some unexplained bugs in the macro expansion engine. E.g. false-positive "Use of moved value" for i32 - this can be explained by unexplained disappearing of macro expansions =/
I failed to investigate it, so I just add more asserts, more logs and do more attempts to recover things if something got wrong. Maybe we'll catch the reason later.

5504: fix exception in RsFileTypeOverriderForMacroExpansionFileSystem r=vlad20012 a=vlad20012

<details>
  <summary>Stacktrace</summary>

```

java.lang.UnsupportedOperationException: /Users/jasonmcpeak/projects/payrailz-app/packages/pz-ontrac/src/components/modules/paymentOps/BillerManagement/Automatch/Templates/Scopes/__stories__/ScopesAddEditCard.stories.js
	at com.intellij.openapi.vfs.newvfs.impl.StubVirtualFile.unsupported(StubVirtualFile.java:212)
	at com.intellij.openapi.vfs.newvfs.impl.StubVirtualFile.getFileSystem(StubVirtualFile.java:30)
	at org.rust.lang.core.macros.RsFileTypeOverriderForMacroExpansionFileSystem.getOverriddenFileType(RsFileTypeOverriderForMacroExpansionFileSystem.kt:21)
	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.lambda$getFileTypeByFile$13(FileTypeManagerImpl.java:575)
	at com.intellij.openapi.extensions.impl.ExtensionProcessingHelper.computeSafeIfAny(ExtensionProcessingHelper.java:54)
	at com.intellij.openapi.extensions.ExtensionPointName.computeSafeIfAny(ExtensionPointName.java:57)
	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.getFileTypeByFile(FileTypeManagerImpl.java:575)
	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.getFileTypeByFile(FileTypeManagerImpl.java:569)
	at com.intellij.openapi.vfs.VirtualFile.getFileType(VirtualFile.java:346)
	at com.intellij.openapi.fileTypes.ex.FileTypeChooser.getKnownFileTypeOrAssociate(FileTypeChooser.java:125)
	at com.intellij.openapi.fileTypes.ex.FileTypeChooser.getKnownFileTypeOrAssociate(FileTypeChooser.java:137)
	at com.intellij.refactoring.copy.CopyFilesOrDirectoriesDialog.doAction(CopyFilesOrDirectoriesDialog.java:292)
	at com.intellij.refactoring.ui.RefactoringDialog.doRefactorAction(RefactoringDialog.java:136)
	at com.intellij.refactoring.ui.RefactoringDialog$RefactorAction.actionPerformed(RefactoringDialog.java:219)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:270)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6650)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
	at java.desktop/java.awt.Component.processEvent(Component.java:6415)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5025)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4857)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4857)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:965)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:903)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:835)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:732)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:816)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:502)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
	at java.desktop/java.awt.Dialog.show(Dialog.java:1063)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:708)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:437)
	at com.intellij.openapi.ui.DialogWrapper.doShow(DialogWrapper.java:1697)
	at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1656)
	at com.intellij.refactoring.ui.RefactoringDialog.show(RefactoringDialog.java:103)
	at com.intellij.openapi.ui.DialogWrapper.showAndGet(DialogWrapper.java:1670)
	at com.intellij.refactoring.copy.CopyFilesOrDirectoriesHandler.doCopyAsFiles(CopyFilesOrDirectoriesHandler.java:114)
	at com.intellij.refactoring.copy.CopyFilesOrDirectoriesHandler.copyAsFiles(CopyFilesOrDirectoriesHandler.java:99)
	at com.intellij.refactoring.copy.CopyFilesOrDirectoriesHandler.doCopy(CopyFilesOrDirectoriesHandler.java:78)
	at com.intellij.refactoring.copy.CopyHandler.doCopy(CopyHandler.java:51)
	at com.intellij.ide.CopyPasteDelegator$MyEditable.pasteAfterCopy(CopyPasteDelegator.java:193)
	at com.intellij.ide.CopyPasteDelegator$MyEditable.lambda$performDefaultPaste$0(CopyPasteDelegator.java:142)
	at com.intellij.openapi.project.DumbService.computeWithAlternativeResolveEnabled(DumbService.java:353)
	at com.intellij.ide.CopyPasteDelegator$MyEditable.performDefaultPaste(CopyPasteDelegator.java:137)
	at com.intellij.ide.CopyPasteDelegator$MyEditable.performPaste(CopyPasteDelegator.java:122)
	at com.intellij.ide.actions.PasteAction.actionPerformed(PasteAction.java:35)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:295)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:598)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$3(IdeKeyEventDispatcher.java:659)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:658)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:608)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:505)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:459)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:217)
	at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:887)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:832)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:743)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:816)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:502)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
```
</details>

bors r+

Co-authored-by: vlad20012 <beskvlad@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jun 4, 2020

Build failed (retrying...):

bors bot added a commit that referenced this pull request Jun 4, 2020
5500: MACRO: more consistency checks r=vlad20012 a=vlad20012

We still have some unexplained bugs in the macro expansion engine. E.g. false-positive "Use of moved value" for i32 - this can be explained by unexplained disappearing of macro expansions =/
I failed to investigate it, so I just add more asserts, more logs and do more attempts to recover things if something got wrong. Maybe we'll catch the reason later.

Co-authored-by: vlad20012 <beskvlad@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jun 4, 2020

Build failed:

@vlad20012
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Jun 4, 2020

@bors bors bot merged commit d9bdefb into master Jun 4, 2020
@bors bors bot deleted the macro-consistency branch June 4, 2020 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Pull requests that fix some bug(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants