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

Update transition support #847

Merged
merged 1 commit into from
Mar 15, 2024
Merged

Conversation

luispadron
Copy link
Collaborator

@luispadron luispadron commented Mar 6, 2024

This completely updates the transition_support.bzl file. It now essentially is a copy of the one in here: https://github.com/bazelbuild/rules_apple/blob/f37305163dd7546f87839f3187e153c955cd20d8/apple/internal/transition_support.bzl

This is important as Bazel 7 has changed this a lot.

Changes:

  • Delete old transition_support.bzl
  • Add rules_apple transition_support.bzl
  • Add rules_ios specific patches to transition_support.bzl (see the PATCH: comments)
  • Update existing rules to support this new transition_support
  • Remove unused transitions from transition_support.bzl that are used in rules_apple but not in rules_ios

rules/framework.bzl Outdated Show resolved Hide resolved
@luispadron luispadron force-pushed the luis/update-transition_support branch 4 times, most recently from 5121b02 to d139eae Compare March 6, 2024 18:36
@luispadron luispadron marked this pull request as ready for review March 6, 2024 19:06
@luispadron
Copy link
Collaborator Author

luispadron commented Mar 6, 2024

With this change + some toolchain updates i have in a follow up i got a target in our project to pass the build using Bazel 7

luispadron added a commit that referenced this pull request Mar 7, 2024
@luispadron luispadron force-pushed the luis/update-transition_support branch 2 times, most recently from ecdfc8d to 3095a38 Compare March 7, 2024 07:07
@luispadron luispadron changed the base branch from master to luis/update-toolchains March 7, 2024 07:07
@luispadron luispadron force-pushed the luis/update-transition_support branch from 3095a38 to 044972f Compare March 7, 2024 07:38
Copy link
Contributor

@thiagohmcruz thiagohmcruz left a comment

Choose a reason for hiding this comment

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

LGTM, agree that ideally we should get rid of the custom rules_ios stuff and simply import/use what exists upstream. Should we file an issue for that if it doesn't exist already?

ps: edited your PR description to link to rules_apple in a specific SHA instead of master for future reference.

Base automatically changed from luis/update-toolchains to master March 15, 2024 18:41
@luispadron luispadron force-pushed the luis/update-transition_support branch from 044972f to 172d66a Compare March 15, 2024 18:42
@luispadron luispadron merged commit 144eb18 into master Mar 15, 2024
7 checks passed
@luispadron luispadron deleted the luis/update-transition_support branch March 15, 2024 19:12
luispadron added a commit that referenced this pull request Mar 28, 2024
Re-add some code i had deleted in #847, this logic was depended on by
some of our users. Eventually we should unify the transition support
around rules_apple / use that outright.
leonidmelnyk pushed a commit to leonidmelnyk/rules_ios that referenced this pull request Apr 5, 2024
acecilia pushed a commit to revolut-mobile/rules_ios that referenced this pull request Apr 5, 2024
…d libs to CcInfo linking context in Bazel 7 (#3)

* Revert "Add force load libs to CcInfo linking context in Bazel 7 (#2)"

This reverts commit fb395f9.

* Revert "Re-add ios_multi_cpus transition setting from rules_ios (bazel-ios#856)"

This reverts commit 6d6e051.

* Revert "Safer objc_provider assignment in apple_framework_packaging (bazel-ios#855)"

This reverts commit 30733da.

* Revert "Forward package_name to swift_library part of apple_library (bazel-ios#853)"

This reverts commit 3b0ca4c.

* Revert "Allow consumers to set always_include_developer_search_paths in swift_library (bazel-ios#852)"

This reverts commit da630a2.

* Revert "Update transition support (bazel-ios#847)"

This reverts commit 144eb18.

* PMNG-7009 [platform] Add force load libs to CcInfo linking context in Bazel 7

---------

Co-authored-by: Leonid Melnyk <leonid.melnyk@revolut.com>
tymurmustafaiev pushed a commit to tymurmustafaiev/rules_ios that referenced this pull request Apr 16, 2024
acecilia pushed a commit to revolut-mobile/rules_ios that referenced this pull request Apr 16, 2024
luispadron added a commit that referenced this pull request Apr 18, 2024
In Bazel 7+ `ObjcProvider` no longer supports/provides the required
linking attributes.

The migrations is detailed here:
bazelbuild/bazel#16939. In summary, as part of
the migration, the `ObjcProvider` fields which previously provided
linking related information are now now longer providing that info. In
addition to this, a new flag:
`--incompatible_objc_linking_info_migration` was added to further delete
these link attrs from the `ObjcProvider` making it an error if the attr
is used or set.

The goal of this PR is to address support for `ObjcProvider` migration
and to instead use the correct linking information from `CcInfo`. This
will support both Bazel 6/7+. It does not try to support
`--incompatible_objc_linking_info_migration` as that requires more
changes and should be a separate PR

Depends on: 

- #848 
- #847
luispadron added a commit that referenced this pull request Apr 18, 2024
This PR adds 7.1.0 as a tested version in CI. It additionally updates
the README to specify the next release will officially support Bazel 7+

Depends on: 

- #848 
- #847
- #850 

Closes #795
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.

3 participants