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

Automatic compilation on save not working #3548

Open
LukasAV opened this issue May 8, 2024 · 11 comments
Open

Automatic compilation on save not working #3548

LukasAV opened this issue May 8, 2024 · 11 comments
Labels
bug Deficiencies in TeXiFy behaviour.

Comments

@LukasAV
Copy link

LukasAV commented May 8, 2024

Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version

WebStorm 2024.1.2
Build #WS-241.15989.105, built on April 23, 2024
Runtime version: 17.0.10+1-b1207.14 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 6.5.0-28-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 8192M
Cores: 8
Registry:
ide.balloon.shadow.size=0
debugger.new.tool.window.layout=true
ide.new.editor.tabs.vertical.borders=true
ide.experimental.ui=true
ide.editor.tab.selection.animation=true
Non-Bundled Plugins:
com.darkyen.darkyenustimetracker (1.5.3)
com.jetbrains.space (241.15989.9)
ru.adelf.idea.dotenv (2024.1)
PlantUML integration (7.10.1-IJ2023.2)
nl.rubensten.texifyidea (0.9.5)
com.intellij.ml.llm (241.15989.156)
com.github.copilot (1.5.3.5510)
com.chrisrm.idea.MaterialThemeUI (9.2.1)
com.mallowigi (95.0.0)
com.firsttimeinforever.intellij.pdf.viewer.intellij-pdf-viewer (0.15.0)
dev.nx.console (1.23.1)
Current Desktop: X-Cinnamon

Operating System

Linux Mint 21.1 Cinnamon

TeXiFy IDEA version

0.9.5

What I did (steps to reproduce)

Freshly installed the TeXiFy Plugin and enabled compile only on save in the settings.

Defined and selected a LaTeX compilition configuration.

Minimal example to reproduce the problem

\documentclass{article}
\begin{document}
    Line 1
    Line 2
    Line 3
\end{document}

Expected behavior

The compile configuration should run on every save

Actual behavior

The compile configuration runs on the first save via Ctrl+S/File > Save all but not on consecutive saves.

(if applicable) The full stacktrace of the exception thrown

Only found one warning in the WebStorm log

WARN - #c.i.u.x.Binding - No accessors for nl.hannahsten.texifyidea.lang.commands.LatexCommand. This means that state class cannot be serialized properly. Please see https://jb.gg/ij-psoc
@LukasAV LukasAV added bug Deficiencies in TeXiFy behaviour. untriaged Issue type still needs to be triaged or verified. labels May 8, 2024
@PHPirates
Copy link
Collaborator

Hi, thanks for submitting this issue! I cannot reproduce the problem, doing the following:

  • Enable automatic compilation and only compile on save
  • Paste the LaTeX you provided
  • Ctrl + S -> document compiled
  • Type something in the open file
  • Ctrl + S -> document compiled

Could you provide more details on how exactly to reproduce the issue?
In particular, are you sure you edited the document before saving again?

@PHPirates PHPirates added more-info-needed More information is needed from the person filing the issue. and removed untriaged Issue type still needs to be triaged or verified. labels May 13, 2024
@efodx
Copy link

efodx commented May 19, 2024

Hey! Just wanted to say, that I have the same issue. (Only the first save actually compiles the file)
I'm using IntelliJ Ultimate 2024.1, on a Windows 10 machine (if that helps).

It's my first time using the plugin and I've got the issue from the start. If there's anything I can provide to help you narrow the problem down, I'll be glad to help.

@PHPirates
Copy link
Collaborator

You can reproduce the issue with the steps I provided? Could you show a screen recording?
What exactly did you type between the two Save actions?

@efodx
Copy link

efodx commented May 19, 2024

It turns out - not exactly!

After the first save it tries to compile, but can't since it detects a wrong run configuration.
If I run the compilation manually it then compiles successfully, but after the save auto compilation doesn't work.

I then restarted Intellij. Changed something in the document and saved - auto compilation ran correctly.
Then I changed something in the document and saved - auto compilation didn't run again. I even tried with the file -save all option, and it still didn't auto compile.

idea64_SL7n8xzTbl

Hopefully this helps. If the video is not clear enough, I'll make an effort to create a better one :)

@PHPirates
Copy link
Collaborator

Thanks a lot for the video! I have to agree that that is not working as it should. It looks like there might be an exception in the bottom right, though the notification is not showing. Could you upload the file idea.log here? Help > Show log

@efodx
Copy link

efodx commented May 19, 2024

No man, thank you for providing this plugin! It's helping me out a lot!

Anyways, here you go, that's as clean as I could get it. Started up Idea, changed something in the file and saved it. Then changed it a few more times and saved it again - the last few repeated logs are me saving the file.

idea.log

This part of the log might be the answer?
2024-05-19 18:38:18,887 [ 3928] WARN - #c.i.u.x.Binding - No accessors for nl.hannahsten.texifyidea.lang.commands.LatexCommand. This means that state class cannot be serialized properly. Please see https://jb.gg/ij-psoc

Edit: oh damn, that's the same warning as the OP posted, so it might be useless :/

@PHPirates
Copy link
Collaborator

Looking at your video again, it looks like you have the 'automatic compilation on save only' checkbox enabled, but the 'automatic compilation' checkbox above it is disabled. Could you try enabling that, then manually compile once, and then try again?

@efodx
Copy link

efodx commented May 20, 2024

Hey! Thank you so so much, that solved the problem!
I didn't realize I have to have both on. So if you're ever changing the settings menu, maybe convert these options into a dropdown of [Off, Automatic Compilation, Automatic Compilation Only on save], or something similar - to avoid confusion.

Thank you once again!

@PHPirates
Copy link
Collaborator

Thanks for checking! Agree, we should make that a dropdown list.

@PHPirates PHPirates removed the more-info-needed More information is needed from the person filing the issue. label May 21, 2024
@LukasAV
Copy link
Author

LukasAV commented May 21, 2024

Sorry for being absent for a few days and thank you so much for solving the problem!

It did not occur to me as well that the first checkbox needs to be checked as well, now it works fine for me.

@LukasAV LukasAV closed this as completed May 21, 2024
@PHPirates
Copy link
Collaborator

No problem, thanks for reporting the issue! Reopening so I don't forget to make the UI less confusing.

@PHPirates PHPirates reopened this May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Deficiencies in TeXiFy behaviour.
Projects
None yet
Development

No branches or pull requests

3 participants