Fork me on GitHub
#portal
<
2022-04-27
>
xceno15:04:45

Has anyone come across an issue with portal 24.0 and intellij 2022.1 OR intellij 2021.3? portal 24 opens like in the screenshot for me on either version of intellij. Downgrading fixes the issue

R.A. Porter15:04:39

It's been working fine for me on OSX (Catalina). What OS are you on?

💯 1
xceno16:04:21

I'm on Pop!OS 21.10 x8664

xceno16:04:39

so basically ubuntu

R.A. Porter16:04:03

I might be able to find a comparable OS around somewhere later this week if no one else has one at hand. One other question...have you tried rerunning the open function when that happens? There's a known UI issue where it sometimes opens with the wrong theming; maybe that's manifesting like this on your OS.

xceno16:04:29

Alright, no hurry I can downgrade for the time being if all else fails. When I re-run open the "visible fragments" of portal disappear and all that remains is the "nothing to show" message.

xceno16:04:20

I'll try some things. Maybe another plugin or my window manager interferes

👍 1
Jordan Robinson16:04:23

I just updated and tried and have a similar issue, ubuntu 20.04

Jordan Robinson16:04:42

it's like the nothing to show window is on top of portal

xceno16:04:52

exactly! good to know!

Jordan Robinson16:04:36

if I resize the window I can see more of it but the nothing to show overlay doesn't go away, can see things happening behind it too

Jordan Robinson16:04:41

guessing that's the same for you?

xceno16:04:03

yes, that's exactly what's happening

👍 1
Jordan Robinson16:04:38

just for completeness sake, I'm on 2021.3.2

xceno16:04:53

I cloned the repo and try to git bisect between v24 and v23. maybe I manage to find something

❤️ 1
R.A. Porter17:04:04

The only change I would think might impact this would be the addition of the DumbAware marker interface, but it seems more likely to be some IJ change that needs to be accounted for on Linux.

1
☝️ 1
djblue17:04:54

I checked on windows, 24 with latest intellij seems to work :thinking_face:

xceno17:04:27

I'm close to finding the offending commit. it's not the dumbAware change itself

awesome 1
djblue17:04:05

Random question: Are you launching the extension via Intellij after source change, or are you rebuilding the zip?

xceno17:04:38

I'm rebuilding the zip

djblue17:04:40

If you open the extension-intellij directory as a project in Intellij, you should get an option to launch the plugin in a new instance 👌

👍 1
xceno17:04:48

ah! scratch what i wrote earlier. I wrote down the wrong commit hash. It IS the dumbAware commit. But funnily enough there's no UI rendered at all (or it's hidden behind the "nothing to show message")

xceno17:04:23

when I revert to the latest commit in master i see parts of the UI again behind that "nothing to show message"

R.A. Porter17:04:18

Grrr. It's probably an IJ bug on linux that'll need to be reported (or, hopefully, there's a workaround), but that beautiful, beautiful marker might need to be removed.

R.A. Porter17:04:50

@U012ADU90SW since you're right in there, could you try the latest, just removing the interface, and see if that works for you?

xceno17:04:10

Already on it 🙂

xceno17:04:42

yep, it's the interface @U01GXCWSRMW. Are OS compiler flags a thing in clj? :thinking_face:

djblue17:04:31

The issues is there is still only a single artifact for all OS's

R.A. Porter17:04:35

I wish I knew where that 'nothing to show' window/dialog was coming from.

R.A. Porter17:04:44

Did you by any chance try hitting escape to see if that would close it?

xceno17:04:07

uhm good question. let me give it a shot

xceno17:04:20

nope, doesn't help. hitting esc just closes the window

R.A. Porter17:04:42

And if you move the plugin to one of the other locations - top left, bottom right, etc. - or undock/float it, what happens? (If you're busy, obviously don't spend a lot of time on this right now).

xceno18:04:26

that's what I tried initially before starting this thread here. The "nothing ..." overlay persists no matter what

R.A. Porter18:04:44

Damn. Thanks.

xceno18:04:01

I'm currently googling stuff to figure out what dumbaware actually does. I'm not familiar with writing intellij extensions at all. So I'm afraid I can't help much more right now

xceno18:04:54

i fixed it by accident i think

xceno18:04:43

I made this change in factory.clj So (.add component ... Instead of (.add (.getParent component ...

(defn -createToolWindowContent [_this ^Project project ^ToolWindow window]
  (let [component (.getComponent window)]
    (.add component #_(.getParent component) (get-window project))))
To get a feel for what happens. And now it's working again

1
R.A. Porter18:04:32

Trying that locally...

R.A. Porter18:04:10

Well...it works? ¯\(ツ)

😆 1
squirrel 1
xceno18:04:59

hahaha well, happy to help 🤷

🙏 1
xceno18:04:39

maybe someone should try it on OSX too?

R.A. Porter18:04:48

I'm on osx; @U1G869VNV should try on windows. You should open the PR, @U012ADU90SW and get the much deserved credit.

👍 1
xceno18:04:11

Alright! I'll make a PR

xceno19:04:46

Thanks! Glad to be of service 🙂

xceno20:04:36

Well... seems like that was only half a fix. Portal 0.25 in intellij works well in docked mode, but switching to anything else seems to kill / wipe the view. So, for example changing from docked to float causes the tool window to become completely blank. Could you guys confirm this? Judging by what we've seen so far, I guess we need some additional logic to check for the "type" of window we're in. And depending on that we might need to call the .add component or .add (.getParent component logic. Just a very wild guess though

xceno20:04:38

🤷 must be some weird window hierarchies in intellij or something

R.A. Porter20:04:48

And OF COURSE it behaves differently on Linux than on OSX. Works fine for me in all view modes.

xceno20:04:33

good lord what a weird bug to track down

R.A. Porter20:04:48

Are you sure it was wiped? Did you pick float or window? Window goes behind; unpinned docked stays there but closes whenever you go to another window.

R.A. Porter20:04:54

Float should stay on top.

xceno20:04:37

Anything else but docked mode results in a blank window. I even have to restart intellij completely to revive it again

R.A. Porter20:04:52

Undock seems about the same as dock unpinned for me.

xceno20:04:49

ah okay, it's got nothing todo with the docked mode. It's just what I always use as default

xceno20:04:56

just noticed it's simply ANY change

R.A. Porter20:04:05

Well, that doesn't sound like a good fix for your original report, then. 😄

xceno20:04:49

yeah, crap 😕

xceno20:04:54

is there a "window moved" handler or something?

R.A. Porter21:04:42

Blergh. I was hoping I could use another machine for Linux testing but it's not handling the new versions of Clojure+Cursive well, so I'm not going to be able to help directly.

xceno21:04:18

no worries, I try to figure things out here. So... i just commented out the dumbAware interface again, and everything works again. So either something in that initial setup code is wrong, we need additional things in -uiSettingsChanged or both

xceno21:04:55

ugh. Okay folks, I can't figure out where to even look for this bug. All I got is disabling the dumbAware interface to make it work reliably again. My "fix" from before only works if you don't change the viewMode and I have no idea why. And tbh the Intellij platform docs aren't exactly helpful

R.A. Porter21:04:21

I'll poke around a bit and see if I can figure anything out. And I'm sure @U1G869VNV will tackle it later. We might just have to remove DumbAware for now.

xceno22:04:33

Okay, seems like I found a "works on my machine" solution yet again:

(defn -createToolWindowContent [_this ^Project project ^ToolWindow window]
  (let [component (.getComponent window)
        cm (.getContentManager window)
        content  (get-window project)
        content (.createContent (.getFactory cm) content "MyTab" false)]
    (.addContent cm content)))
Putting the portal content inside a tab seems to solve the problem. I can now start / stop portal and move the window around in different configurations and view modes. There's the downside of having a useless Tab displayed of course

R.A. Porter22:04:23

That does seem a downside, but maybe tolerable? I'll try it on osx.

xceno22:04:35

Well, keep in mind that I have no idea what I'm actually doing. I'm just trying out random crap while browsing the IntelliJ docs and source code. So there might be a nice/proper solution somewhere.

R.A. Porter22:04:08

I was going to say that, other than the label of the tab, it seemed workable to me...and then I hit a button I'd never hit before. Try it out, if you would. Change view mode to float than hit this button...

djblue22:04:00

Multiple tabs might actually be a nice way to open multiple instances instead of only having one :thinking_face:

xceno22:04:39

Works for me @U01GXCWSRMW. So it crashes for you if you do this?

xceno22:04:59

So you're saying we could turn this bug into a feature while we're at it @U1G869VNV?😂

💯 1
☝️ 1
R.A. Porter22:04:03

@U1G869VNV Yeah. Once I saw the tab, I thought it might be an interesting avenue. When I hit that particular button, on the version of IJ that the runide gradle task pulled up, it blanked the screen and nothing would restore it until I restarted the IDE. Haven't tried it on the latest and greatest, because runide is pulling, I think, the lowest version in the compatibility list.

R.A. Porter22:04:41

Alright. I've got to bail for now. I may look more later. Damn plugins. 😄

xceno22:04:35

yeah me too. but I'll leave the packaged extension with the above change here if anyone else wants to try it out (and confirm that it actually works)

R.A. Porter02:04:41

I cannot get a virtual environment running on this old dog of a laptop. I won't be able to duplicate the issue myself, so it's going to be up to you, @U012ADU90SW

xceno07:04:48

I also have a windows machine here and I could spin up a couple VMs to try stuff out. Doing that now. @UC3B7UJF2 If time allows, would you be so kind and download the official 0.25.0 release and confirm that changing the View Mode crashes the portal tool window? And after that, install the new version in that zip file above ☝️ which should fix it again. @U1G869VNV So as I see it, my commit helps getting anything to display on linux since the introduction of the dumbAware interface, but since it's not stable I'd like to follow up on it. So, if we can confirm that introducing a Tab in the tool window makes it stable on all platforms, we can use it as some kind of hotfix and then flesh it out later into a new feature. Or we remove the dumbAware interface for now until we have a proper solution on all platforms. Either way, I'd be happy to help.

Jordan Robinson08:04:57

will do, I have a few meetings this morning but I'll get to it at some point today for sure 👍

🙏 1
Jordan Robinson08:04:41

actually scratch that, I just got a bit of time so did it now. It looks okay after installing 0.25.0 from the zip, the previous bug is resolved and also I can change the view mode fine

Jordan Robinson08:04:59

still works in each of the view modes

xceno08:04:48

Oh really? Huh that's interesting. But you're on IntelliJ 2021.3 right? Might be an additional 2022.1 bug for me then

Jordan Robinson08:04:28

yep, this specific build:

xceno08:04:32

Okay then, thanks for trying it out! I'm going to spin up some VMs now and install both versions of IntelliJ to check things out

Jordan Robinson08:04:42

please do ping me if I can be any more help

xceno08:04:04

will do, thank you!

👍 1
xceno09:04:27

Alright, did some testing: Windows 10: 2021.3 - 0.25.0 & 0.25.1 -> OK 2022.1 - 0.25.0 & 0.25.1 -> OK Ubuntu 20.04: 2021.3 - 0.25.0 -> OK Pop!_OS 21.10: 2022.1 - 0.25.0 -> ViewMode Bug / The bug went away after re-installing intellij. Couldn't provoke it anymore since. Just happened again. 0.25.1 -> OK 2021.3 - 0.25.0 -> ViewMode Bug (rarely, hard to reproduce) So, yeah... Don't know what to make of it

R.A. Porter12:04:51

@U012ADU90SW Have you tested any of the versions - 0.24 included - with the patch version of Cursive that Colin released last night? May not matter at all, but at this point, who knows.

xceno12:04:00

Yep I was running the latest EAP yesterday, and I now run cursive 1.12.3 proper. So I did test 0.24 on the 1.12.3-EAP1 & EAP2.