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

Error compiling outline: Unable to compile 'outline.go'[Errno 2] No such file or directory: 'go' #2406

Closed
danny-su opened this Issue Mar 20, 2017 · 14 comments

Comments

Projects
None yet
4 participants
@danny-su

danny-su commented Mar 20, 2017

Short Summary

Error compiling outline: Unable to compile 'outline.go'[Errno 2] No such file or directory: 'go'

def get_go_exe(self, env):
        golang_path = env.get_pref("golangDefaultLocation", "")
        if golang_path and golang_path != "":
            return golang_path
        path = [d.strip()
                for d in env.get_envvar("PATH", "").split(os.pathsep)
                if d.strip()]
        try:
            return which.which('go', path=path)
        except which.WhichError:
            return 'go' # Might as well go for broke

Because both env.get_pref("golangDefaultLocation", "") and env.get_envvar("PATH", "") return an empty string, which.which('go', path=path) raised a which.WhichError, and get_go_exe returns 'go', which is not expected.

I have the correct configuration of PATH of the prefs->environments and the default location of languages->go.

Steps to Reproduce

  1. close all open files, and exit komodo ide
  2. open komodo ide and open a go file.

Expected results

get_go_exe returns the correct path of go.

Actual results

get_go_exe returns "go"

Platform Information

Komodo Edit or IDE?
Komodo Version?
Operating System (and version)?

Komodo IDE, version 10.2.1, build 89853, platform macosx.
Built on Wed Mar 8 12:59:55 2017.

macOS Sierra 10.12.3

Additional Information

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Mar 20, 2017

Hi, based on the code snippet you gave, the default location of languages -> go cannot be set correctly if Komodo gets to the which.which() call. If languages -> go is set properly, that setting should be returned immediately. Please double-check that setting.

@danny-su

This comment has been minimized.

danny-su commented Mar 21, 2017

Obviously, I tested "Find on path" and the full path "/usr/local/bin/go", but both failed. When opening a go file, get_go_exe method will be invoked multi-times, the first time which is used to build outline.go, both env.get_pref("golangDefaultLocation", "") and env.get_envvar("PATH", "") return an empty string, but it's weird in the next invocations env.get_envvar("PATH", "") returns correct PATH value instead of an empty string.

@Naatan

This comment has been minimized.

Member

Naatan commented Mar 21, 2017

Are you using the Go addon by chance? This functionality is native to Komodo as of version 9, the Go addon is redundant and we should probably just remove it altogether.

@danny-su

This comment has been minimized.

danny-su commented Mar 22, 2017

I didn't use Go addon. I used the komodo native support for go. I tested on my work Mac and home Mac, both have the same issue, it is very easy to be reproduced if you do exactly as what I said.

@Naatan

This comment has been minimized.

Member

Naatan commented Mar 22, 2017

Because both env.get_pref("golangDefaultLocation", "") and env.get_envvar("PATH", "") return an empty string, which.which('go', path=path) raised a which.WhichError, and get_go_exe returns 'go', which is not expected.

How did you determine this? Modified the code with debug statements and ran it?

Also, you say it still fails even when you directly set the Go executable via Languages > Go. Is the error in this case the same or is it a different error?

@danny-su

This comment has been minimized.

danny-su commented Mar 23, 2017

I modified the codeintel_go.py file to test, the same error.

@Naatan Naatan added this to the 10.2.2 milestone Mar 23, 2017

@Naatan

This comment has been minimized.

Member

Naatan commented Mar 23, 2017

Thanks @danny-su, we'll investigate this further internally.

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Mar 27, 2017

@Naatan

This comment has been minimized.

Member

Naatan commented Mar 27, 2017

@cgchoffman can you please share the nightly here when it's ready (that would be tomorrows nightly).

@danny-su once shared could you verify that the nightly fixes the problem for you? I want to make sure that this issue is limited to the codebrowser and we didn't miss anything. Given that the reproduction steps are very specific it's hard for us to verify this ourselves.

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented Mar 27, 2017

Got it. I'll update this ticket when there are bits available.

@danny-su

This comment has been minimized.

danny-su commented Mar 28, 2017

@Naatan of course. I will verify the bug fix when available.

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented Mar 28, 2017

Nightly has been staged. It will be live around 12:30pm PST. Before you download to test confirm that the build ID 89870 and the version is 10.2.2, eg Komodo-IDE-10.2.2-89870-macosx-x86_64.dmg.

They will be here: http://downloads.activestate.com/Komodo/nightly/komodoide/latest-10.2.x/

@danny-su

This comment has been minimized.

danny-su commented Mar 30, 2017

@cgchoffman The bug was fixed, thank you very much!

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented Mar 30, 2017

Thanks for checking @danny-su! You can thank @mitchell-as for that fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment