Skip to content
This repository has been archived by the owner on Apr 3, 2018. It is now read-only.

Build automatically needs to be OFF to for compile error checking to work #228

Open
abligh opened this issue Nov 5, 2016 · 6 comments
Open

Comments

@abligh
Copy link

abligh commented Nov 5, 2016

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:

Auto-check is also not invoked if a file is saved automatically due to a regular build being requested.

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.

@bruno-medeiros
Copy link
Contributor

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.

@abligh
Copy link
Author

abligh commented Nov 7, 2016

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.

On 7 Nov 2016, at 17:23, Bruno Medeiros notifications@github.com wrote:

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.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Alex Bligh

@bruno-medeiros
Copy link
Contributor

bruno-medeiros commented Nov 8, 2016

@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?

@abligh
Copy link
Author

abligh commented Nov 8, 2016

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.

On 8 Nov 2016, at 12:48, Bruno Medeiros notifications@github.com wrote:

@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? Does the Go Build console show anything after you save the editor?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Alex Bligh

@bruno-medeiros
Copy link
Contributor

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)

@abligh
Copy link
Author

abligh commented Nov 9, 2016

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

On 8 Nov 2016, at 18:22, Bruno Medeiros notifications@github.com wrote:

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)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Alex Bligh

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

No branches or pull requests

2 participants