Skip to content

Conversation

skhamis
Copy link
Contributor

@skhamis skhamis commented Sep 4, 2025

Kicking off the next phase of moving swift infra fully to firefox-ios. Now that https://github.com/mozilla-mobile/firefox-ios/actions/workflows/update-appservices-nightly.yml has been driving the updates no problem and firefox-ios reporting no issues of using the local SPM. We can remove any non-generated swift files as they now live fully in the firefox-ios repo.

Unfortunately due to how we need to generate UniFFi files, we still need to generate then upload those artifacts for them to pull down. However we net some benefits:

  1. You don't have to wait for nightlies to test your code, once the artifacts are made in main you can kick off on the firefox-ios side to pull the latest and immediately use.
  2. We don't need to go:
// old way
[make changes] -> [merge] -> [wait for r-c-s] -> [wait for firefox-ios]

// new way
[make changes] -> [merge] -> [pull down on firefox-ios] 

small but noticeable improvements!

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

@skhamis skhamis requested review from a team and lougeniaC64 September 4, 2025 01:13
@mhammond
Copy link
Member

mhammond commented Sep 4, 2025

One challenge here is going to be the story for nimbus tests. Eg, see this test which is referencing a file which is being removed from this repo.

What's very odd is that this actually broke when the file was originally moved from the nimbus directory to the ios megazord directory many months ago - and the test do all fail for me locally, but seem to work in CI. We probably need to work with @freshstrangemusic and/or the rest of the nimbus team to work out what's going on here and how important those tests are, because I think they might be salvagable if the files are just moved, but will not be if they are removed.

@skhamis skhamis force-pushed the remove-swift-wrappers branch 2 times, most recently from 5386847 to 4ae78b7 Compare September 5, 2025 01:44
@skhamis skhamis removed request for a team and lougeniaC64 September 5, 2025 19:51
@skhamis skhamis closed this Sep 5, 2025
@skhamis skhamis reopened this Sep 5, 2025
@skhamis
Copy link
Contributor Author

skhamis commented Sep 5, 2025

One challenge here is going to be the story for nimbus tests. Eg, see this test which is referencing a file which is being removed from this repo.

What's very odd is that this actually broke when the file was originally moved from the nimbus directory to the ios megazord directory many months ago - and the test do all fail for me locally, but seem to work in CI. We probably need to work with @freshstrangemusic and/or the rest of the nimbus team to work out what's going on here and how important those tests are, because I think they might be salvagable if the files are just moved, but will not be if they are removed.

Per offline discussions, it was discovered these tests never actually ran for quite awhile now and PR merged #6923 to officially "turn off" those tests.

@skhamis skhamis marked this pull request as ready for review September 5, 2025 20:39
@mhammond
Copy link
Member

mhammond commented Sep 5, 2025

FTR, the nimbus issues I discussed above have largely been neutered by #6923

edit: haha, sammy and I wrote the same thing at the same time

@skhamis skhamis requested a review from bendk September 5, 2025 20:41
Copy link
Member

@mhammond mhammond left a comment

Choose a reason for hiding this comment

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

This is a bit of a rubber stamp, but assuming ios is good with this it lgtm

@skhamis
Copy link
Contributor Author

skhamis commented Sep 5, 2025

I can't add @issammani to reviewers so I'll just ping him via this comment. Feel free to ping anyone else that might want a look here. I added the whole a-s team here as after this PR merges, we will officially be changing the pattern of how we dev, cut and release for iOS. We don't need everyone's r+ here just awareness that this process begins via this PR.

@issammani
Copy link
Contributor

Hey @skhamis. I ran the automation locally and the python fails because we still have a leftover call to run_tests and copy_source_dirs in

ensure_dir(args.xcframework_dir)
run_tests(args)
xcframework_build(args, "MozillaRustComponents.xcframework.zip")
xcframework_build(args, "FocusRustComponents.xcframework.zip")
generate_glean_metrics(args)
generate_uniffi_bindings(args)
copy_source_dirs(args)

Otherwise this looks good. I also opened mozilla-mobile/firefox-ios#29190 to merge after this to only update files under Generated/. I think without it will delete the existing swift files since they don't exist anymore in the tarball.

@skhamis skhamis changed the title Remove swift wrappers from a-s Remove swift wrappers from a-s [ci full] Sep 8, 2025
@skhamis skhamis force-pushed the remove-swift-wrappers branch from 4ae78b7 to cbd4553 Compare September 8, 2025 22:03
@skhamis
Copy link
Contributor Author

skhamis commented Sep 9, 2025

Hey @skhamis. I ran the automation locally and the python fails because we still have a leftover call to run_tests and copy_source_dirs in

ensure_dir(args.xcframework_dir)
run_tests(args)
xcframework_build(args, "MozillaRustComponents.xcframework.zip")
xcframework_build(args, "FocusRustComponents.xcframework.zip")
generate_glean_metrics(args)
generate_uniffi_bindings(args)
copy_source_dirs(args)

Otherwise this looks good. I also opened mozilla-mobile/firefox-ios#29190 to merge after this to only update files under Generated/. I think without it will delete the existing swift files since they don't exist anymore in the tarball.

Great catches! Little worrying that the CI didn't pick up on that (Since CI has been green) but we'll find out quick if things go wrong lol. I'm going to wait to land this until mozilla-mobile/firefox-ios#29190 is also r+'d so we can land these quickly after each other (I don't think we'll miss any but just incase).

@skhamis skhamis added this pull request to the merge queue Sep 9, 2025
Merged via the queue into mozilla:main with commit 2da2494 Sep 9, 2025
59 checks passed
@skhamis skhamis deleted the remove-swift-wrappers branch September 9, 2025 19:27
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