Skip to content

Add C dependencies to vendor#16127

Merged
kvch merged 8 commits intoelastic:go-modulesfrom
kvch:add-mage-vendor-target
Feb 11, 2020
Merged

Add C dependencies to vendor#16127
kvch merged 8 commits intoelastic:go-modulesfrom
kvch:add-mage-vendor-target

Conversation

@kvch
Copy link
Copy Markdown
Contributor

@kvch kvch commented Feb 6, 2020

What does this PR do?

This PR adds a mechanism on top of go mod vendor in order to copy C source files required by Beats to the folder vendor. From now on it is not sufficient to run go mod vendor as it only copies go files to vendor. Instead mage vendor or make vendor must be used.

If a new dependency with non-Golang sources are added, files can be moved to our vendor folder by adding a new entry to the list copyAll in dev-tools/mage/gomod.go.

CopyModules{
	Name: "github.com/godror/godror",  // name of the dependency
	FilesToCopy: []string{ // list of the folders or files to copy
		"odpi",
	},
}

This PR also passes -mod=vendor to make sure the local vendor folder is used during build.

Why is it important?

We have two dependencies which contain C source files:

  • github.com/godror/godror
  • github.com/tsg/go-daemon

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
    - [ ] I have made corresponding changes to the documentation
    - [ ] I have made the corresponding change to the default configuration files
    - [ ] I have added tests that prove my fix is effective or that my feature works

Related issues

Requires #15998
Requires tsg/go-daemon#4

@kvch kvch added in progress Pull request is currently in progress. Team:Services (Deprecated) Label for the former Integrations-Services team labels Feb 6, 2020
@kvch kvch mentioned this pull request Feb 6, 2020
18 tasks
Comment thread dev-tools/mage/gomod.go Outdated
Comment thread dev-tools/mage/gotool/modules.go Outdated
@kvch
Copy link
Copy Markdown
Contributor Author

kvch commented Feb 7, 2020

I have rebased it on top of #16191 to see how the CI reacts.

@kvch kvch force-pushed the add-mage-vendor-target branch from fb98fb9 to 39ab474 Compare February 10, 2020 16:00
@kvch kvch mentioned this pull request Feb 10, 2020
Comment thread dev-tools/mage/gotool/modules.go Outdated
Comment thread dev-tools/mage/gomod.go Outdated
Comment thread dev-tools/mage/gomod.go Outdated
Comment thread tools/tools.go
@ycombinator ycombinator self-assigned this Feb 11, 2020
@kvch kvch removed the in progress Pull request is currently in progress. label Feb 11, 2020
Copy link
Copy Markdown
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@kvch kvch merged commit 0a9637f into elastic:go-modules Feb 11, 2020
kvch added a commit that referenced this pull request Feb 26, 2020
## What does this PR do?

This PR adds a mechanism on top of `go mod vendor` in order to copy C source files required by Beats to the folder `vendor`. From now on it is not sufficient to run `go mod vendor` as it only copies go files to `vendor`. Instead `mage vendor` or `make vendor` must be used.

If a new dependency with non-Golang sources are added, files can be moved to our vendor folder by adding a new entry to the list `copyAll` in `dev-tools/mage/gomod.go`.

```golang
CopyModules{
	Name: "github.com/godror/godror",  // name of the dependency
	FilesToCopy: []string{ // list of the folders or files to copy
		"odpi",
	},
}
```

This PR also passes `-mod=vendor` to make sure the local vendor folder is used during build.

## Why is it important?

We have two dependencies which contain C source files:

- `github.com/godror/godror`
- `github.com/tsg/go-daemon`
kvch added a commit that referenced this pull request Feb 27, 2020
## What does this PR do?

This PR adds a mechanism on top of `go mod vendor` in order to copy C source files required by Beats to the folder `vendor`. From now on it is not sufficient to run `go mod vendor` as it only copies go files to `vendor`. Instead `mage vendor` or `make vendor` must be used.

If a new dependency with non-Golang sources are added, files can be moved to our vendor folder by adding a new entry to the list `copyAll` in `dev-tools/mage/gomod.go`.

```golang
CopyModules{
	Name: "github.com/godror/godror",  // name of the dependency
	FilesToCopy: []string{ // list of the folders or files to copy
		"odpi",
	},
}
```

This PR also passes `-mod=vendor` to make sure the local vendor folder is used during build.

## Why is it important?

We have two dependencies which contain C source files:

- `github.com/godror/godror`
- `github.com/tsg/go-daemon`
kvch added a commit that referenced this pull request Feb 28, 2020
## What does this PR do?

This PR adds a mechanism on top of `go mod vendor` in order to copy C source files required by Beats to the folder `vendor`. From now on it is not sufficient to run `go mod vendor` as it only copies go files to `vendor`. Instead `mage vendor` or `make vendor` must be used.

If a new dependency with non-Golang sources are added, files can be moved to our vendor folder by adding a new entry to the list `copyAll` in `dev-tools/mage/gomod.go`.

```golang
CopyModules{
	Name: "github.com/godror/godror",  // name of the dependency
	FilesToCopy: []string{ // list of the folders or files to copy
		"odpi",
	},
}
```

This PR also passes `-mod=vendor` to make sure the local vendor folder is used during build.

## Why is it important?

We have two dependencies which contain C source files:

- `github.com/godror/godror`
- `github.com/tsg/go-daemon`
kvch added a commit that referenced this pull request Mar 2, 2020
## What does this PR do?

This PR adds a mechanism on top of `go mod vendor` in order to copy C source files required by Beats to the folder `vendor`. From now on it is not sufficient to run `go mod vendor` as it only copies go files to `vendor`. Instead `mage vendor` or `make vendor` must be used.

If a new dependency with non-Golang sources are added, files can be moved to our vendor folder by adding a new entry to the list `copyAll` in `dev-tools/mage/gomod.go`.

```golang
CopyModules{
	Name: "github.com/godror/godror",  // name of the dependency
	FilesToCopy: []string{ // list of the folders or files to copy
		"odpi",
	},
}
```

This PR also passes `-mod=vendor` to make sure the local vendor folder is used during build.

## Why is it important?

We have two dependencies which contain C source files:

- `github.com/godror/godror`
- `github.com/tsg/go-daemon`
kvch added a commit that referenced this pull request Mar 3, 2020
## What does this PR do?

This PR adds a mechanism on top of `go mod vendor` in order to copy C source files required by Beats to the folder `vendor`. From now on it is not sufficient to run `go mod vendor` as it only copies go files to `vendor`. Instead `mage vendor` or `make vendor` must be used.

If a new dependency with non-Golang sources are added, files can be moved to our vendor folder by adding a new entry to the list `copyAll` in `dev-tools/mage/gomod.go`.

```golang
CopyModules{
	Name: "github.com/godror/godror",  // name of the dependency
	FilesToCopy: []string{ // list of the folders or files to copy
		"odpi",
	},
}
```

This PR also passes `-mod=vendor` to make sure the local vendor folder is used during build.

## Why is it important?

We have two dependencies which contain C source files:

- `github.com/godror/godror`
- `github.com/tsg/go-daemon`
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
## What does this PR do?

This PR adds a mechanism on top of `go mod vendor` in order to copy C source files required by Beats to the folder `vendor`. From now on it is not sufficient to run `go mod vendor` as it only copies go files to `vendor`. Instead `mage vendor` or `make vendor` must be used.

If a new dependency with non-Golang sources are added, files can be moved to our vendor folder by adding a new entry to the list `copyAll` in `dev-tools/mage/gomod.go`.

```golang
CopyModules{
	Name: "github.com/godror/godror",  // name of the dependency
	FilesToCopy: []string{ // list of the folders or files to copy
		"odpi",
	},
}
```

This PR also passes `-mod=vendor` to make sure the local vendor folder is used during build.

## Why is it important?

We have two dependencies which contain C source files:

- `github.com/godror/godror`
- `github.com/tsg/go-daemon`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team:Services (Deprecated) Label for the former Integrations-Services team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants