Skip to content

Saving a class leads to three compiles #1526

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

Open
isc-bsaviano opened this issue Apr 7, 2025 · 6 comments
Open

Saving a class leads to three compiles #1526

isc-bsaviano opened this issue Apr 7, 2025 · 6 comments

Comments

@isc-bsaviano
Copy link
Contributor

We have updated to the new version 3.0.1. Now we have the problem described.
After saving, we get this output. The class was compiled three times.
It was a very simple class without any dependencies.

`Compilation started on 04/07/2025 08:40:41 with qualifiers 'cukb'
Class twa.unittests.util.TestHelper is up-to-date.
Compilation finished successfully in 0.099s.

Compilation started on 04/07/2025 08:40:42 with qualifiers 'cukb'
Class twa.unittests.util.TestHelper is up-to-date.
Compilation finished successfully in 0.018s.

Compilation started on 04/07/2025 08:40:43 with qualifiers 'cukb'
Class twa.unittests.util.TestHelper is up-to-date.
Compilation finished successfully in 0.020s.`

Originally posted by @TwaHendrik in #1470 (comment)

@isc-bsaviano
Copy link
Contributor Author

Hi @TwaHendrik, thanks for that additional info. I created an issue for your problem. This point is very interesting:

We use the default -> All. We also try it with vscodeOnly (the compilation then works as expected), but then we lose the Git functionality.

I would not expect this setting to change the behavior when a class is edited inside of VS Code. Do you have any other programs that might be changing the file after it gets saved, like git hooks? I have not been able to reproduce this issue so far.

@TwaHendrik
Copy link

Hi @isc-bsaviano ,

We have simplified the test scenario as much as possible. We have started a completely new Docker with IRIS 2024.1 (Image: containers.intersystems.com/intersystems/iris:2024.1). No custom settings made. The Settings.json also only contains the default settings and a completely new vs code folder. We create only one class in default USER Namespace and save it via crtl + s.

Class

Class twa.testfile Extends %RegisteredObject
{
 
}

Output

Compilation started on 04/10/2025 08:54:58 with qualifiers 'cuk'
Class twa.testfile is up-to-date.
Compilation finished successfully in 0.015s.
 
Compilation started on 04/10/2025 08:54:59 with qualifiers 'cuk'
Class twa.testfile is up-to-date.
Compilation finished successfully in 0.004s.

I hope this helps to reproduce the error.

@isc-bsaviano
Copy link
Contributor Author

Hi @TwaHendrik, thanks for the detailed reproduction steps.I still cannot get this to occur. Here's what I did:

  1. Created a new folder.
  2. Copied over a .vscode/settings.json file from another folder that only has an objectscript.conn setting.
  3. Opened the new folder in VS Code.
  4. Clicked on the InterSystems view to make sure our extensions were active.
  5. Created a new cls file by right-clicking in the file explorer and selecting New File....
  6. Saw the new class open in an editor tab. The Class scaffolding was filled in, and the document was dirty.
  7. I saved the class. It only compiled once.

@TwaHendrik
Copy link

Hi @isc-bsaviano ,

We have tested it again on Mac OS and it works there. There seems to be a difference between windows and mac.
The problem does not occur every time. Sometimes it is only compiled once, sometimes twice and sometimes even more frequently. Sometimes the compile fails because the class is already locked by another process of the same compile operation.

  1. Do you use mac os or windows?
  2. Do you use a clean installation of IRIS?
  3. Is it possible to monitor the compile requests fired by vs code to iris?

@isc-bsaviano
Copy link
Contributor Author

HI @TwaHendrik, I was testing on Mac. I will have access to a Windows machine on Monday so I will test this again then.

@isc-bsaviano
Copy link
Contributor Author

I was able to reproduce this on Windows.

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

No branches or pull requests

2 participants