Skip to content

Setting up the Goland IDE

Tyler Denniston edited this page Apr 26, 2019 · 3 revisions

Setting up Goland

Initial setup

  1. Clone the project:

    $ git clone git@github.com:TileDB-Inc/TileDB-Go.git
    
  2. Open the TileDB-Go directory as a project in Goland.

  3. When the project opens you will be prompted to configure integration for Go Modules (vgo). Say yes.

  4. In the configuration screen, Check the "Enable Go Modules (vgo) integration" checkbox. Leave the "Vendoring mode" checkbox unchecked.

  5. Add a new build configuration (top right of the screen):

    • Type: go build
    • Run kind: Package
    • Package path: github.com/TileDB-Inc/TileDB-Go
    • Output directory: /path/to/TileDB-Go/build (useful for manually cleaning up after builds)
    • Environment: CGO_CFLAGS=-I/path/to/TileDB/dist/include and CGO_LDFLAGS=-L/path/to/TileDB/dist/lib
    • Go tool arguments: empty
  6. Run the build configuration.

Running the tests

  1. Add a new test configuration:
    • Type: go test
    • Test kind: Package
    • Package path: github.com/TileDB-Inc/TileDB-Go
    • Same CGO_{C,LD}FLAGS as above
    • Also DYLD_LIBRARY_PATH=/path/to/TileDB/dist/lib
  2. Open a test file, e.g. array_test.go. At the import line for the testify dependency, click on the error bubble and select "Sync packages of github.com/TileDB-Inc/TileDB-Go". This will download the dependencies.
  3. Run the test configuration.
Clone this wiki locally