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

Declare toolchains in a separate repository #3348

Merged
merged 8 commits into from Nov 24, 2022

Commits on Nov 14, 2022

  1. Declare toolchains in a separate repository

    For instance, if the SDK repository is `@go_sdk`, the toolchain rules will be defined in `@go_sdk_toolchains`. This avoids eagerly fetching `@go_sdk`, fixing bazelbuild#3196.
    
    One caveat: `:sdk_version_setting` needs to be defined in the same repo as the toolchain rule, e.g. in `@go_sdk_toolchains`. I tried `target_settings = "@go_sdk//:sdk_version_setting"`, but that causes `@go_sdk` to be eagerly fetched again.
    
    This means that `@go_sdk_toolchains` needs to know the SDK version. There are two possibilities:
    * The user specifies the version up front, for instance via `go_register_toolchains(version = ...)`. In that case, `@go_sdk_toolchains` uses this version.
    * The user does not specify the version up front. `go_wrap_sdk`, `go_download_sdk`, and `go_local_sdk` do not require a `version` attribute. In this case, we have no choice but to inspect the SDK itself to obtain the version, forcing an eager load. However, we can at least add an optional `version` attribute to these rules, so that users can avoid the eager fetch if they wish.
    
    In all cases, when a `version` attribute is provided by the user, the implementation (lazily) validates that it matches the actual SDK version.
    jfirebaugh committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    59a20d2 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2022

  1. Fix failing test

    jfirebaugh committed Nov 15, 2022
    Configuration menu
    Copy the full SHA
    1823034 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cce840d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bdfc7d0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    64f9a0a View commit details
    Browse the repository at this point in the history
  5. Fix failing test

    jfirebaugh committed Nov 15, 2022
    Configuration menu
    Copy the full SHA
    8ca6ddb View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2022

  1. Configuration menu
    Copy the full SHA
    bca8a4b View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2022

  1. Refine documentation

    jfirebaugh committed Nov 17, 2022
    Configuration menu
    Copy the full SHA
    5fb202a View commit details
    Browse the repository at this point in the history