-
Notifications
You must be signed in to change notification settings - Fork 287
Build automatically needs to be OFF to for compile error checking to work #228
Comments
Hum, auto-check (compile error detection on save) should still work even if "Build Automatically" is enabled. Can you try this with a new project, one created with the newest version of Goclipse? This might be a transitional issue. |
I tried it both with a new project (where I first found it) and with an existing project. I had set the new project up (using muscle memory) the same way as I set up the projects previously, as referenced above.
Alex Bligh |
@abligh and you enabled a Build Target for "Enable for auto-check (invoke on editor save)"? And still it does nothing when you save a Go file of that project? Hum, does the Go Build console show anything after you save the editor? |
I did. Oddly the new project I created before is now does not exhibit this behaviour, and neither does a dummy test project I just created. However, old projects continue to exhibit the behaviour. The new project I created before had files copied from an older project, so perhaps it is some form of weird transition issue.
Alex Bligh |
Try this for old projects: open project Properties page, go to "Builders", select "Go Project Builder" and click "Edit...". There should be an option "During Auto Builds..." which normally should be disabled, but likely is still enabled due to a version upgrade/transition issue. (it would have been nicer if Goclipse had detected this automatically, yeah) |
Bruno, Thanks. Firstly, this issue is difficult to replicate because when it is broken, it seems to be only broken half the time - some sort of race condition I guess. Secondly, that option was ticked in the old project, and unticking it fixed the issue so I could no longer replicate it. That option was also ticked in the first new project I set up, which perhaps explains why I could occasionally replicate it there - I believe it was ticked because I ticked it as part of the set up. It was not ticked in the second new project I set up, which perhaps explains why I could never replicate it there. Thirdly, it is a bit counter-intuitive that the builder should not run during auto builds. Some documentation (or removing the option) would be useful. Alex
Alex Bligh |
This took a little while to work out and is probably a documentation issue more than anything.
I upgraded to the head version of goclipse, and introducing a compile-time error stopped being detected when I saved the file.
The root cause of this was as follows. As per #193 release v0.14.0 turned off 'build-automatically'. However, it was possible to get it working by having it ticked in the menu, and altering the configuration of the builders so that they ran on an autobuild. However, upgrading to v0.15+ then breaks this configuration, even if I enable Auto-check, because per https://github.com/GoClipse/goclipse/blob/v0.15.0/documentation/UserGuide.md#building:
What this seems to mean is that if you have 'build automatically' switched on (hoping this will build automatically and point out your syntax errors) you are out of luck, because this requests a regular build on save, which in turn prevents auto-check working, which appears to be the sole place the highlighted errors are drawn from. Strangely, building manually still points out these errors. For anyone transitioning between versions, this is a little confusing. I don't know whether there is a point to 'build automatically' any more, but if there is, I suppose the fact it breaks compile error detection on save is some sort of bug.
The text was updated successfully, but these errors were encountered: