Skip to content
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

Issue when importing h3 package #16

Closed
nsehgal opened this issue Mar 19, 2019 · 3 comments
Closed

Issue when importing h3 package #16

nsehgal opened this issue Mar 19, 2019 · 3 comments

Comments

@nsehgal
Copy link

nsehgal commented Mar 19, 2019

I imported uber h3 backage but getting this error on build

# voyager/vendor/github.com/uber/h3-go vendor/github.com/uber/h3-go/h3.go:27:10: fatal error: 'h3api.h' file not found #include <h3api.h> ^~~~~~~~~ 1 error generated.

Using dep for dependencies.

Thanks for the help.

@jogly
Copy link
Collaborator

jogly commented Mar 20, 2019

hi @nsehgal - thanks for raising! In your Gopkg.toml file, can you make sure that under [prune] unused-packages = true is omitted? dep decides that the include folder is not a go package (which is accurate) and deletes it when pulling in h3. I will make a note of this in our README so others don't fall victim to this :)

Alternatively, you can set this for h3 only by adding a project override:
in Gopkg.toml:

[prune]
  go-tests = true
  unused-packages = true
  [[prune.project]]
    name = "github.com/uber/h3-go"
    unused-packages = false

@nsehgal
Copy link
Author

nsehgal commented Mar 20, 2019

Hi @joegilley. Thanks for your reply. It solved the issue.

@nsehgal nsehgal closed this as completed Mar 20, 2019
jogly pushed a commit that referenced this issue May 31, 2019
@vitaminniy
Copy link

vitaminniy commented Nov 5, 2019

@joegilley hello, this issue reproduces with go modules and vendored dependencies:

package main

import _ "github.com/uber/h3-go"

func main() {}
> go mod vendor -v
# github.com/uber/h3-go v3.0.1+incompatible
github.com/uber/h3-go

> go build -mod=vendor
# github.com/uber/h3-go
../vendor/github.com/uber/h3-go/h3.go:27:10: fatal error: 'h3api.h' file not found
#include <h3api.h>
         ^~~~~~~~~
1 error generated.

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

No branches or pull requests

3 participants