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

Resolve Bazel dylib issue due to aggressive code stripping #321

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

lickel
Copy link
Collaborator

@lickel lickel commented Feb 19, 2025

The dylib being generated internally is code stripping private vars incorrectly. This should resolve it.

Checklist

N/A / validated by internal CI

  • Unit Tests
  • UI Tests
  • Snapshot Tests (iOS only)
  • I have made corresponding changes to the documentation

@lickel lickel marked this pull request as ready for review February 19, 2025 19:40
@lickel lickel requested review from a team as code owners February 19, 2025 19:41
@lickel lickel enabled auto-merge (squash) February 19, 2025 19:42
@lickel lickel merged commit 4b9f961 into main Feb 19, 2025
7 checks passed
@lickel lickel deleted the alickel/bazel-dylib-bug branch February 19, 2025 19:53
@@ -44,6 +44,7 @@ open class ScreenViewController<ScreenType: Screen>: WorkflowUIViewController {
ScreenType.self
}

@_alwaysEmitIntoClient
Copy link
Member

Choose a reason for hiding this comment

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

It'd be great to add some context around this so that future-us will know what the heck this was added for.

Copy link
Contributor

Choose a reason for hiding this comment

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

also... is this a workaround for a linker issue? can we deal with it via build args/configuration vs changing the source? is this a bug that should be reported somewhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

is this a workaround for a linker issue?

This is a linker issue; however, it works fine in SPM land. There's something about the Square Bazel build infrastructure (and the current versions we're pinned at) which results in this.

can we deal with it via build args/configuration vs changing the source?

@congt tried a ton of things, and this was the only thing we could do to solve it previously

is this a bug that should be reported somewhere?

Hard to say since it's Bazel specific and possibly Square's rules specific

@robmaceachern
Copy link
Member

Some context: Slack

Undefined symbols for architecture arm64:
  "WorkflowUI.ScreenViewController.(previousEnvironment in _DB8FA6BB9AD946655B155F5E091E6939).modify : ViewEnvironment.ViewEnvironment", referenced from:
      full type metadata for WorkflowModalContainer.ModalContainerViewController in libWorkflowModalContainer_swift.a[4](ModalContainerViewController.swift.o)
      full type metadata for DashboardAppletPrimitives.AppletViewControllerWrapper in libDashboardAppletPrimitives_swift.a[8](AppletViewControllerWrapper.swift.o)
      full type metadata for DashboardConsentCompliance.FakeConsentScreenViewController in libDashboardConsentCompliance_swift.a[4](MockDashboardConsentServiceProvider.swift.o)
      full type metadata for ConsentComplianceImpl.ConsentComplianceDebugSettingsWrapperViewController in libConsentComplianceImpl_swift.a[5](ConsentComplianceDebugSettingsScreen.swift.o)
      full type metadata for ConsentComplianceImpl.(OneTrustConsentPreferencesViewController in _51610E307DFF66F1A48B70B7BA140B37) in libConsentComplianceImpl_swift.a[20](RealConsentPreferencesWorkflow.swift.o)
      full type metadata for SquareLegacyAppletWrapper.LegacyAppletWrapperViewController in libSquareLegacyAppletWrapper_swift.a[2](LegacyAppletWrapperScreen.swift.o)
  "WorkflowUI.ScreenViewController.(previousEnvironment in _DB8FA6BB9AD946655B155F5E091E6939).getter : ViewEnvironment.ViewEnvironment", referenced from:
      full type metadata for WorkflowModalContainer.ModalContainerViewController in libWorkflowModalContainer_swift.a[4](ModalContainerViewController.swift.o)
      full type metadata for DashboardAppletPrimitives.AppletViewControllerWrapper in libDashboardAppletPrimitives_swift.a[8](AppletViewControllerWrapper.swift.o)
      full type metadata for DashboardConsentCompliance.FakeConsentScreenViewController in libDashboardConsentCompliance_swift.a[4](MockDashboardConsentServiceProvider.swift.o)
      full type metadata for ConsentComplianceImpl.ConsentComplianceDebugSettingsWrapperViewController in libConsentComplianceImpl_swift.a[5](ConsentComplianceDebugSettingsScreen.swift.o)
      full type metadata for ConsentComplianceImpl.(OneTrustConsentPreferencesViewController in _51610E307DFF66F1A48B70B7BA140B37) in libConsentComplianceImpl_swift.a[20](RealConsentPreferencesWorkflow.swift.o)
      full type metadata for SquareLegacyAppletWrapper.LegacyAppletWrapperViewController in libSquareLegacyAppletWrapper_swift.a[2](LegacyAppletWrapperScreen.swift.o)

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.

4 participants