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

Add major version "v7" to import path #16331

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Feb 14, 2020

What does this PR do?

This PR changes the import path of Beats from github.com/elastic/beats to github.com/elastic/beats/v7.

Some of the migration was done using this tool: https://github.com/marwan-at-work/mod
However, it is not perfect so I had to use sed, too.

Why is it important?

Every go module which has a major version bigger than v1 has to include the major version in its import path:

By definition, a new major version of a package is not backwards compatible with the previous version. This means a new major version of a module must have a different module path than the previous version. Starting with v2, the major version must appear at the end of the module path (declared in the module statement in the go.mod file).

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 corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works

Requires #16329

@kvch kvch requested review from a team as code owners February 14, 2020 12:44
@kvch kvch force-pushed the add-major-version-to-imports branch from dd6dd28 to 460e0a2 Compare February 14, 2020 12:53
@kvch kvch changed the title add major version to import path Add major version "v7" to import path Feb 14, 2020
@kvch kvch mentioned this pull request Feb 14, 2020
18 tasks
@kvch kvch added [zube]: In Progress Team:Services (Deprecated) Label for the former Integrations-Services team labels Feb 18, 2020
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Grepping around I couldn't find wrong import paths, and make check is green, not sure what else to check. We can fix other issues in smaller PRs as they appear.

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

This PR changes the import path of Beats from `github.com/elastic/beats` to `github.com/elastic/beats/v7`.

Some of the migration was done using this tool: https://github.com/marwan-at-work/mod
However, it is not perfect so I had to use `sed`, too.

## Why is it important?

Every go module which has a major version bigger than v1 has to include the major version in its import path:

> By definition, a new major version of a package is not backwards compatible with the previous version. This means a new major version of a module must have a different module path than the previous version. Starting with v2, the major version must appear at the end of the module path (declared in the module statement in the go.mod file).
kvch added a commit that referenced this pull request Feb 27, 2020
##  What does this PR do?

This PR changes the import path of Beats from `github.com/elastic/beats` to `github.com/elastic/beats/v7`.

Some of the migration was done using this tool: https://github.com/marwan-at-work/mod
However, it is not perfect so I had to use `sed`, too.

## Why is it important?

Every go module which has a major version bigger than v1 has to include the major version in its import path:

> By definition, a new major version of a package is not backwards compatible with the previous version. This means a new major version of a module must have a different module path than the previous version. Starting with v2, the major version must appear at the end of the module path (declared in the module statement in the go.mod file).
kvch added a commit that referenced this pull request Feb 28, 2020
##  What does this PR do?

This PR changes the import path of Beats from `github.com/elastic/beats` to `github.com/elastic/beats/v7`.

Some of the migration was done using this tool: https://github.com/marwan-at-work/mod
However, it is not perfect so I had to use `sed`, too.

## Why is it important?

Every go module which has a major version bigger than v1 has to include the major version in its import path:

> By definition, a new major version of a package is not backwards compatible with the previous version. This means a new major version of a module must have a different module path than the previous version. Starting with v2, the major version must appear at the end of the module path (declared in the module statement in the go.mod file).
kvch added a commit that referenced this pull request Mar 2, 2020
##  What does this PR do?

This PR changes the import path of Beats from `github.com/elastic/beats` to `github.com/elastic/beats/v7`.

Some of the migration was done using this tool: https://github.com/marwan-at-work/mod
However, it is not perfect so I had to use `sed`, too.

## Why is it important?

Every go module which has a major version bigger than v1 has to include the major version in its import path:

> By definition, a new major version of a package is not backwards compatible with the previous version. This means a new major version of a module must have a different module path than the previous version. Starting with v2, the major version must appear at the end of the module path (declared in the module statement in the go.mod file).
kvch added a commit that referenced this pull request Mar 3, 2020
##  What does this PR do?

This PR changes the import path of Beats from `github.com/elastic/beats` to `github.com/elastic/beats/v7`.

Some of the migration was done using this tool: https://github.com/marwan-at-work/mod
However, it is not perfect so I had to use `sed`, too.

## Why is it important?

Every go module which has a major version bigger than v1 has to include the major version in its import path:

> By definition, a new major version of a package is not backwards compatible with the previous version. This means a new major version of a module must have a different module path than the previous version. Starting with v2, the major version must appear at the end of the module path (declared in the module statement in the go.mod file).
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
##  What does this PR do?

This PR changes the import path of Beats from `github.com/elastic/beats` to `github.com/elastic/beats/v7`.

Some of the migration was done using this tool: https://github.com/marwan-at-work/mod
However, it is not perfect so I had to use `sed`, too.

## Why is it important?

Every go module which has a major version bigger than v1 has to include the major version in its import path:

> By definition, a new major version of a package is not backwards compatible with the previous version. This means a new major version of a module must have a different module path than the previous version. Starting with v2, the major version must appear at the end of the module path (declared in the module statement in the go.mod file).
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.

3 participants