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

Frequent "Importing <module> SQLDelight" message in IDE #2511

Closed
eygraber opened this issue Aug 4, 2021 · 5 comments · Fixed by #2883
Closed

Frequent "Importing <module> SQLDelight" message in IDE #2511

eygraber opened this issue Aug 4, 2021 · 5 comments · Fixed by #2883

Comments

@eygraber
Copy link
Contributor

eygraber commented Aug 4, 2021

SQLDelight Version

1.5.1

IDE Version

Android Studio 7.0.0

Dialect

SQLite

Describe the Bug

I notice that the `Importing SQLDelight" message shows at the bottom of the IDE a lot. It even happens in projects that aren't using SqlDelight (I haven't done more testing, but this might be when there are multiple projects open and one of them is using SqlDelight, although I'm pretty sure I've seen it happen with just a non SqlDelight project open).

Stacktrace

No response

@dimsuz
Copy link

dimsuz commented Jan 6, 2022

This bug also causes status bar height to change and this shifts whole IDE UI back and forth. Drives me crazy a bit, had to turn off the status bar 😄 Now it just overlays a progress bar, but this is not as irritating.

By the way I figured out that this message pops up

a) When Project pane is focused
b) Mouse is moved
→ 3 messages "Importing SQLDelight..." follow each mouse move

I've recorded a small screencast (attached, hide video controls to see the status bar) where you can see that when I move the mouse, each move is followed by that message in the status bar. But if I shift focus to the file editing buffer and then move the mouse: nothing happens. If I move the focus back: each mouse move triggers messages again.

2022-01-06.14-54-59.mp4

@dimsuz
Copy link

dimsuz commented Jan 6, 2022

Ah, it still happens even when editor buffer is focused: whenever I move the text cursor or scroll. So the above case is not exhaustive. It looks like something more general, maybe some "sync" IDE event firing, dunno.

But still interesting that mouse moves trigger this only when Project pane is focused :)

P.S Forgot to mention: this is version sqldelight-1.5.3 + IntelliJ IDEA 2021.3.1

@AlecKazakova
Copy link
Collaborator

That'd just be some weird IntelliJ stuff, we're just using their APIs to display a background task so have no control over the UX

We can pretty easily just turn off this message, it was handy for me personally to know that the SQLDelight plugin was connecting to gradle (thats what this message is indicating) and it's also there so that you understand why the .sq files wouldn't be working yet - it's essentially the same as the "Indexing" message you get when you use a programming language, the IDE needs time to build its index of the files and sync with gradle.

I've mostly left this issue open though because it's happening for projects that don't have SQLDelight, we can fix that

@dimsuz
Copy link

dimsuz commented Jan 6, 2022

Yeah, I'm fully aware that UI jumps are obviously not something SqlDelight is responsible for, some IDE bug. I just thought that maybe there's some SqlDelight issue which is causing this message to pop up more often than it should.

If this is not the case I'd vote for removing this message because it's either spamming the status bar or (if it is disabled) it pops up the progress bar overlays every second or so, kinda constantly steals attention.

Or maybe you could debounce these messages somehow internally...

@eygraber
Copy link
Contributor Author

Possibly related to #2797

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants