go-lang-plugin-org/go-lang-idea-plugin

Changing SDK doesn't work

Opened this issue · 3 comments

orian commented
  • Plugin version (or commit hash): 0.13.1914

  • IDE name and version: IntelliJ IDEA 2016.3.1 ; Build #IU-163.9166.29, built on December 9, 2016

  • Java version: JRE: 1.8.0_112-release-408-b2 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

  • OS name and version: MacOS Sierra

  • What are you trying to do? Change project SDK in Project Structure.

  • What would you expect to happen? A new SDK to be in place.

  • What happens? Old SDK stays.

The file in main directory myproject.iml:

<?xml version="1.0" encoding="UTF-8"?>
<module type="GO_MODULE" version="4">
  <component name="NewModuleRootManager" inherit-compiler-output="true">
    <exclude-output />
    <content url="file://$MODULE_DIR$" />
    <orderEntry type="jdk" jdkName="Go 1.7.4" jdkType="Go SDK" />
    <orderEntry type="sourceFolder" forTests="false" />
  </component>
</module>

Whereas I expect it to be:

<?xml version="1.0" encoding="UTF-8"?>
<module type="GO_MODULE" version="4">
  <component name="NewModuleRootManager" inherit-compiler-output="true">
    <exclude-output />
    <content url="file://$MODULE_DIR$" />
    <orderEntry type="jdk" jdkName="Go 1.6.3 (appengine-1.9.48)" jdkType="Go SDK" />
    <orderEntry type="sourceFolder" forTests="false" />
  </component>
</module>

  1. it should be myproject.iml
  2. are you sure that myproject module uses Project SDK?
orian commented
  1. Updated the description. Misspelling.
  2. Good question I don't know how to answer. I've created a pure Go project and placed a main.go in the main project directory following some guideline on the first App Engine project. Then I've tried to change the project SDK.

Take a look at Project structure | Modules | <your module> | Dependencies | Module SDK