Skip to content

Support for go modules breaks compatibility of paths for go1.10 #878

@marcusljx

Description

@marcusljx

Please use the following questions as a guideline to help me answer
your issue/question without further inquiry. Thank you.

Which version of Elastic are you using?

  • elastic.v2 (for Elasticsearch 1.x)
  • elastic.v3 (for Elasticsearch 2.x)
  • elastic.v5 (for Elasticsearch 5.x)
  • elastic.v6 (for Elasticsearch 6.x)

Please describe the expected behavior

Using go1.10.2 with glide:

My glide configuration is:

- package: github.com/olivere/elastic
  version: ^6.0.0

My import statement is:

import "github.com/olivere/elastic"

Please describe the actual behavior

The client.go has an import error as it has this import statement:

	"github.com/olivere/elastic/v6/config"

The v6 directory is not imported by glide (used only with go modules), and hence on go1.10.2 this fails to build with the error:

vendor/github.com/olivere/elastic/client.go:24:2: cannot find package "github.com/olivere/elastic/v6/config"

Any steps to reproduce the behavior?

  • Downgrade to go1.10.2
  • Clone the repository to a project's .../vendor/github.com/olivere/elastic
  • run go vet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions