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

language/go: implement minimal module compatibility #564

Merged
merged 1 commit into from
Jul 1, 2019

Conversation

jayconrod
Copy link
Contributor

  • The Go extension now accepts flags -go_repository_mode and
    -go_repository_module_mode.
  • The Go extension will emit importpath_aliases attributes for
    libraries with importpath set if -go_repository_mode was set,
    Gazelle is in module mode, the prefix is actually a prefix of
    importpath, the prefix contains a semantic import
    version suffix, and the prefix was set in the root package.
    Such a library can be imported with more than one import path.
  • The minimum version of rules_go is now 0.19.0, since support for
    importpath_aliases is needed.
  • When initializing RemoteCache, which is used to resolve external
    import paths, if we have a known import path that contains a
    semantic import version suffix, but we don't have a known import
    path for the path without the suffix, we create an aliases.

Also:

  • Avoided parsing WORKSPACE and related files multiple times when
    -repo_config is set.

Fixes #477

* The Go extension now accepts flags -go_repository_mode and
  -go_repository_module_mode.
* The Go extension will emit importpath_aliases attributes for
  libraries with importpath set if -go_repository_mode was set,
  Gazelle is in module mode, the prefix is actually a prefix of
  importpath, the prefix contains a semantic import
  version suffix, and the prefix was set in the root package.
  Such a library can be imported with more than one import path.
* The minimum version of rules_go is now 0.19.0, since support for
  importpath_aliases is needed.
* When initializing RemoteCache, which is used to resolve external
  import paths, if we have a known import path that contains a
  semantic import version suffix, but we don't have a known import
  path for the path without the suffix, we create an aliases.

Also:

* Avoided parsing WORKSPACE and related files multiple times when
  -repo_config is set.

Fixes bazel-contrib#477
@jayconrod jayconrod requested a review from ianthehat as a code owner June 28, 2019 20:54
@jayconrod jayconrod merged commit 38bd65e into bazel-contrib:master Jul 1, 2019
@jayconrod jayconrod deleted the min-mod-compat branch July 1, 2019 15:14
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

Successfully merging this pull request may close these issues.

go_repository: minimal module compatibility
1 participant