[objective_c] Move test/util.c to helper package (objective_c_helper)#3050
[objective_c] Move test/util.c to helper package (objective_c_helper)#3050Gurleen-kansray wants to merge 7 commits intodart-lang:mainfrom
Conversation
|
Hi @liamappelbe , the commit adding pkgs/objective_c_helper/lib/src/util.c and pubspec.yaml is included in this branch. GitHub shows util.c as deleted from objective_c/test and updates the test files, but the new helper package files aren’t separately highlighted... that’s just how renamed/moved files appear. Everything is up-to-date and included in this PR, ready for review. |
PR HealthLicense Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
This check can be disabled by tagging the PR with API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
This check can be disabled by tagging the PR with
Breaking changes
|
| Package | Change | Current Version | New Version | Needed Version | Looking good? |
|---|---|---|---|---|---|
| objective_c | Breaking | 9.2.5 | 9.3.0 | 10.0.0 Got "9.3.0" expected >= "10.0.0" (breaking changes) |
|
| objective_c_helper | Breaking | 0.0.0 | 0.0.0 | 0.0.0 Report was not created for package:objective_c_helper 0.0.1 (dir=/home/runner/work/native/native/current_repo/pkgs/objective_c_helper). Error: Error: Exception: Package not available (could not find package objective_c_helper at https://pub.dev). |
This check can be disabled by tagging the PR with skip-breaking-check.
Changelog Entry ❗
| Package | Changed Files |
|---|---|
| package:objective_c | pkgs/objective_c/pubspec.yaml |
Changes to files need to be accounted for in their respective changelogs.
This check can be disabled by tagging the PR with skip-changelog-check.
|
util.c and util.dart are two different files. You've moved util.c, but not util.dart, then you've updated all the imports for util.dart, so they now point at a non-existent file. You shouldn't just move util.dart though. There are parts of that file that should remain in pkg:objc. Only move the parts of util.dart that relate to util.c. Anyway, the bigger part of this job is updating the build hooks. The build bot is currently failing because you moved the file without updating the hook: https://github.com/dart-lang/native/blob/main/pkgs/objective_c/hook/build.dart. |
…s moved to objective_c_helper; updated tests and build hook
|
Hi @liamappelbe ,this PR refactors internal utility code and updates the related build wiring. |
Until issue #2272 is fixed, test/util.c cannot be conditionally included in test builds. This PR moves it to a separate helper package and updates the tests to import it from there.
Changes:
Created objective_c_helper with:
lib/src/util.c containing the original test C code
Updated objective_c tests to import util.dart from the helper package
Removed util.c from objective_c
Added dependency_overrides in pubspec.yaml for local helper package:
objective_c_helper:
path: ../objective_c_helper
Commits:
Move test/util.c to helper package
Remove test/util.c from objective_c
Update test imports to use objective_c_helper
Update pubspec.yaml
[x] I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Related issue: #2272