application-services/automation
Ryan Kelly ce6a72abd8 Have Nimbus optionally import Glean as an external Swift module.
Currently on iOS, Nimbus and Glean are always compiled together as
part of the same Swift module in the iOS megazord. This means that
Nimbus can see and use many of Glean's internal helper functions,
which in fact it does.

When we switch to distributing via Swift packages, we'll need to
be more careful about inter-module hygiene. I think ideally the
Nimbus Swift code would consume Glean as an ordinary Swift dependency
via `import Glean`.

To make that work while also preserving the current behaviour for
current consumers, I have:

* Added a conditional import of Glean, which gets ignored in the
  existing megazord but makes Glean available in a Swift package build.
* Copied the internal helper modules that we were using from Glean
  into the `nimbus/ios` directory, so that this directory can be
  compiled as a standalone Swift module using only public Glean
  APIs.

Importantly, I have *not* included the copied utility files in the
iOS megazord Xcode project. That build already uses the ones from
Glean and would error out if we included duplicates.

All in all, this doesn't seem like a sustainable setup, but perhaps
it can be the first step towards something cleaner. Maybe we could
make a shared utility module that both Glean and Nimbus can depend
on? Maybe Glean could commit to making these utilities part of its
public API surface?

Suggestions welcome! What I know is that this helps unblock the work
on publishing as a Swift package in the meantime. Fixes #4308.
2021-08-09 05:08:09 +00:00
..
symbols-generation Switch releases to taskgraph. 2020-06-23 09:07:02 +01:00
cargo-update-pr.py Rename `master` to `main` in many places 2020-06-29 08:43:33 -07:00
check_artifact_size.sh Use double square brackets in bash scripts 2019-07-24 15:55:31 -04:00
check_protobuf_files_current.py Rename `master` to `main` in many places 2020-06-29 08:43:33 -07:00
emit_coverage_info.sh Produce code coverage in CI using `grcov` 2020-07-23 11:23:10 -07:00
lint_bash_scripts.sh Use double square brackets in bash scripts 2019-07-24 15:55:31 -04:00
maybe_run_fxios_tests.py Run firefox-ios smoketests on PR 2020-03-31 19:13:19 -04:00
prepare-release.py Updating the prepare-release script 2021-07-13 12:49:08 -04:00
publish_to_maven_local_if_modified.py Removed auto-generated metrics.md files, fixed error in publishToLocalMaven with directories (#4098) 2021-05-19 10:03:28 +10:00
run_ios_tests.sh Run firefox-ios smoketests on PR 2020-03-31 19:13:19 -04:00
shared.py Allow running android smoketests from pull-request CI 2020-04-08 17:40:02 +10:00
smoke-test-android-components.py Fix a-c smoketest script for upstream changes. 2021-02-04 15:12:10 +11:00
smoke-test-fenix.py The android-components default branch is now `main`. 2021-07-29 11:02:04 +10:00
smoke-test-firefox-ios.py Add scripts to easily run a-c and fenix smoketests. 2020-03-20 07:52:28 +11:00
tests.py Have Nimbus optionally import Glean as an external Swift module. 2021-08-09 05:08:09 +00:00
upload-to-codecov.sh Don't use the codecov bash uploader 2021-06-14 10:50:35 -04:00
upload_android_symbols.sh Merge pull request #3168 from MihaiTabara/releases 2020-06-23 09:52:14 -04:00