gauge-vscode icon indicating copy to clipboard operation
gauge-vscode copied to clipboard

Auto Save feature re-enables itself when a Gauge project is loaded

Open gusgonnet opened this issue 5 years ago • 10 comments

Every time a Gauge project is opened in VS Code, Auto Save becomes enabled on its own (well, I suspect the plugin is enabling it when it becomes active).

Observations

  • I open VS Code then disable Auto Save (from Menu -> File -> Auto Save)
  • Auto Save is not checked anymore
  • I close VS Code
  • reopen VS Code in a project that does not contain any .spec file (any file that triggers the gauge plugin to kick in) -> Auto Save is still disabled <<-- this is the expected behavior
  • I close VS Code
  • reopen VS Code in a Gauge project -> Auto Save becomes enabled (and not by the user, me) <<-- this is the issue

VS Code info:

Version: 1.33.1 Commit: 51b0b28134d51361cf996d2f0a1c698247aeabd8 Date: 2019-04-11T08:20:22.771Z Electron: 3.1.6 Chrome: 66.0.3359.181 Node.js: 10.2.0 V8: 6.6.346.32 OS: Linux x64 4.15.0-48-generic


Gauge plugin info:

Name: Gauge Id: getgauge.gauge Description: Gauge support for VScode. Version: 0.0.9 Publisher: getgauge VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=getgauge.gauge

Thanks! Gustavo.

gusgonnet avatar May 13 '19 18:05 gusgonnet

Couldn't replicate the issue with the flow you have mentioned, seems to persist the user selected value of auto save.

Steps that I did try:

  • Uninstalled existing extension and installed fresh 0.0.9 version of plugin
  • Ignored optimise vscode setting for gauge pop up
  • Tried enabling auto save
  • closed and opened the project, this persisted the enabled setting.
  • Disabled auto save and closed the window.
  • opening the project again had the auto save disabled

Is there something different you are doing and also please verify if there are any extensions that is enabling auto save.

NivedhaSenthil avatar May 14 '19 04:05 NivedhaSenthil

hum, that's weird. Now, to rule out the possibility of another extension changing the setting, I disabled Gauge, then repeated the experiment. The Auto Save setting remains disabled. One thing I noticed that we may have done differently: Once I opened the project, I had a .spec file already opened from the past. If I have no files opened already, the setting does not change at load time.

Now, I observe that my VS Code does a kind of reload or something the very first time that it opens a .spec file (I believe when the Gauge extension kicks in and starts adding decoration to my code otherwise inert code) and there is where the setting is changed.

So, to test on your side:

can you repeat the experiment, but this time after opening the project, also double clicking in a spec file to open it?

Thanks! Gustavo.

gusgonnet avatar May 14 '19 10:05 gusgonnet

I have had a .spec file opened previously too, dint help reproducing the issue. Which OS you are in ? I had tried in MacOs Mojave

NivedhaSenthil avatar May 15 '19 11:05 NivedhaSenthil

Hi, sorry for not specifying that important detail before. I am on Ubuntu 16.04.

(oh, I now notice this is included in the VS Code info in the first post of this thread, to some extent)

Are there any Gauge debug logs that I would be able to take a look at for this? Thanks, Gustavo.

gusgonnet avatar May 16 '19 12:05 gusgonnet

I can confirm that I see the same issue as @gusgonnet on my pop_os (based on ubuntu 19.04)

sriv avatar May 17 '19 01:05 sriv

@gusgonnet Please look for Gauge > Recommended Settings > Options in you User settings. Is it set to Apply & Reload

Screenshot 2019-05-20 at 6 05 42 PM

negiDharmendra avatar May 20 '19 12:05 negiDharmendra

@gusgonnet Please look for Gauge > Recommended Settings > Options in you User settings. Is it set to Apply & Reload

Hi @negiDharmendra ,

yes, I see it set to Apply and Reload:

Screenshot from 2019-05-21 14-52-49

Anything else to check? Thanks!

gusgonnet avatar May 21 '19 18:05 gusgonnet

@gusgonnet Please set Gauge > Recommended Settings > Options to Ignore. So that the recommended settings won't be applied by gauge plugin also the notification to apply recommended settings won't be shown again.

Apoorva-GA avatar May 22 '19 08:05 Apoorva-GA

Hi @Apoorva-GA , that fixes this issue - thank you!

gusgonnet avatar May 22 '19 12:05 gusgonnet

Reopening the issue, as the below mentioned behaviour will be helpful.

Expected behavior

When Gauge > Recommended Settings > Options is set to Apply & Reload, Recommended settings should be applied to the gauge-project and not globally.

Actual behavior

When Gauge > Recommended Settings > Options is set to Apply & Reload. Recommended settings are applied globally, which might affect non-gauge projects.

Version

gauge-vscode plugin : 0.0.11.nightly-2019-05-17

Apoorva-GA avatar May 23 '19 06:05 Apoorva-GA