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

Repo names in platform_mappings aren't handled with bzlmod #17127

Closed
keith opened this issue Jan 3, 2023 · 8 comments
Closed

Repo names in platform_mappings aren't handled with bzlmod #17127

keith opened this issue Jan 3, 2023 · 8 comments
Assignees
Labels
area-Bzlmod Bzlmod-specific PRs, issues, and feature requests not stale Issues or PRs that are inactive but not considered stale P2 We'll consider working on this in future. (Assignee optional) team-Configurability platforms, toolchains, cquery, select(), config transitions team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug

Comments

@keith
Copy link
Member

keith commented Jan 3, 2023

Description of the bug:

With a platform_mappings file like:

platforms:
  @build_bazel_apple_support//platforms:macos_x86_64
    --cpu=darwin_x86_64

and this in your MODULE.bazel:

bazel_dep(
    name = "apple_support",
    repo_name = "build_bazel_apple_support",
    version = "1.3.2",
)

bazel errors with:

no such package '@build_bazel_apple_support//platforms': The repository '@build_bazel_apple_support' could not be resolved: Repository '@build_bazel_apple_support' is not defined

changing to:

platforms:
  @apple_support~1.3.2//platforms:macos_x86_64
    --cpu=darwin_x86_64

seems to work, but I believe that would require updating version each time you updated the rules

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which operating system are you running Bazel on?

macOS

What is the output of bazel info release?

6.0.0rc4

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@sgowroji sgowroji added type: bug platform: apple team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. untriaged area-Bzlmod Bzlmod-specific PRs, issues, and feature requests labels Jan 4, 2023
@fmeum
Copy link
Collaborator

fmeum commented Jan 4, 2023

Should be fixed by #17133

@Wyverald
Copy link
Member

Wyverald commented Jan 4, 2023

I tried fixing this a few months ago but ran into circular dependency problems in Bazel's test setup code. Will take another look later.

@Wyverald Wyverald added P2 We'll consider working on this in future. (Assignee optional) team-Configurability platforms, toolchains, cquery, select(), config transitions and removed platform: apple untriaged labels Jan 4, 2023
@github-actions
Copy link

github-actions bot commented Feb 9, 2023

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 30 days. It will be closed in the next 7 days unless any other activity occurs or the "not stale" label is added.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Feb 9, 2023
@brentleyjones
Copy link
Contributor

@meteorcloudy (or whoever): Can we only have stale applied if we are waiting for info from the opener of the issue. This isn't stale AFAICT, since it's triaged.

@brentleyjones
Copy link
Contributor

@keertk

@sgowroji sgowroji removed the stale Issues or PRs that are stale (no activity for 30 days) label Feb 9, 2023
@keertk keertk added the not stale Issues or PRs that are inactive but not considered stale label Feb 9, 2023
@keertk
Copy link
Member

keertk commented Feb 9, 2023

Hi all, apologies for the confusion. We're trying to sustainably manage the number of open issues/PRs in the bazel repo and bring down the backlog.

All issues & PRs without any activity for 30 days will get a ping from the bot. If there's no further activity for an additional 7/14 days, they will be automatically closed.

If you do not want your issue/PR to be closed after the ping (or flagged), we request that you add a comment or notify a maintainer, and we'll add one of the following labels so that the issue is left open:

  • Issues: "not stale", "awaiting-bazeler"
  • PRs: "not stale, "awaiting-review", "awaiting-PR-merge"

I hope this helps. Let me know if you have any questions. We'll do our part to make sure appropriate labels are in place so that your issues/PRs don't get closed (or flagged)! cc @sgowroji @kshyanashree

brentleyjones added a commit to MobileNativeFoundation/rules_xcodeproj that referenced this issue Feb 22, 2023
Also changed the Bazel 6 Workflow to Bzlmod.

Works around bazelbuild/bazel#17127.
@comius
Copy link
Contributor

comius commented Sep 7, 2023

Hey I ran into this bug as well. Reproduction is simply to copy platform_mappings from rules_apple into rules_swift. The latter has bzlmod support.

This is a potential blocker to enable C++ toolchain resolution in Bazel (rules_swift are failing, rules_apple work). I'm saying potential, because the decision is either enable C++ toolchain resoution or bzlmod :(

@meteorcloudy
Copy link
Member

because the decision is either enable C++ toolchain resoution or bzlmod :(

There is a fix at #17133, @Wyverald let's get that in so that we can have both!

@github-project-automation github-project-automation bot moved this to Todo in Bzlmod Sep 7, 2023
@meteorcloudy meteorcloudy added this to the 7.0.0 branch cut milestone Sep 7, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Bzlmod Sep 8, 2023
fmeum added a commit to fmeum/bazel that referenced this issue Sep 12, 2023
Fixes bazelbuild#17127

Closes bazelbuild#17133.

PiperOrigin-RevId: 563803704
Change-Id: I0f49fbfce624207b81a6ca4f7e564d9f3b525d54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Bzlmod Bzlmod-specific PRs, issues, and feature requests not stale Issues or PRs that are inactive but not considered stale P2 We'll consider working on this in future. (Assignee optional) team-Configurability platforms, toolchains, cquery, select(), config transitions team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

8 participants