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

operator redeclaration make verification fail of swiftinterface #481

Closed
JCSooHwanCho opened this issue Jun 14, 2023 · 6 comments · Fixed by #482
Closed

operator redeclaration make verification fail of swiftinterface #481

JCSooHwanCho opened this issue Jun 14, 2023 · 6 comments · Fixed by #482

Comments

@JCSooHwanCho
Copy link
Contributor

in addition to #480 , operator redeclaration made verification fail of .swiftinterface file. It can be resolved with only one declaration in module.

error: verify-emitted-module-interface command failed with exit code 1 (use -v to see invocation)
CoreStore/CoreStore.swiftinterface:3365:16: error: operator redeclared
infix operator .= : AssignmentPrecedence
               ^
CoreStore/CoreStore.swiftinterface:3326:16: note: previous operator declaration here
infix operator .= : AssignmentPrecedence
               ^
CoreStore/CoreStore.swiftinterface:3366:16: error: operator redeclared
infix operator .== : ComparisonPrecedence
               ^
CoreStore/CoreStore.swiftinterface:3327:16: note: previous operator declaration here
infix operator .== : ComparisonPrecedence
@JohnEstropia
Copy link
Owner

Interesting. Can you tell me how (SPM, Cocoapods, etc.) you are importing CoreStore into your dependencies?

@JCSooHwanCho
Copy link
Contributor Author

I made it as static .xcframework using bazel.

  1. use http_archive rule to download repository
  2. to build it as static framework using Line's rule(ios_static_framework)

In fact, there is a workaround. That is giving an no-verify-emitted-module-interface option to compiler. But I think it should be not user's concern.

@JohnEstropia
Copy link
Owner

In fact, there is a workaround. That is giving an no-verify-emitted-module-interface option to compiler. But I think it should be not user's concern.

I'm not very familiar with Bezel, but I'm not sure there is a way library authors can specify compiler directives when the code is compiled as a static library. The formally supported installation modes build frameworks instead of a static lib, so I think this should be handled on the API users' side.

On that note, the specific issue on operators can be avoided at least, since CoreStore can just declare it once for the whole module. I'll push something later just to avoid this case, but I'd warn that this fix is local to CoreStore. If an external static library declares their own .= and .== operators it's likely you will have this same issue anyway.

@JCSooHwanCho
Copy link
Contributor Author

Conflicting with other module is just potential problem, but conflicting within module is present problem. How about focusing on present problem?

@JohnEstropia
Copy link
Owner

Yes, I mentioned here:

I'll push something later just to avoid this case, but I'd warn that this fix is local to CoreStore

Feel free to make a PR ahead, if you have time.

@JCSooHwanCho
Copy link
Contributor Author

I'll make it. Thanks for quick reply!

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 a pull request may close this issue.

2 participants