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

Function name conflicts with LinearAlgebra.dot and StaticArrays.similar_type; neither package is a dependency but they are semantically compatible #4

Closed
brainandforce opened this issue May 16, 2024 · 3 comments

Comments

@brainandforce
Copy link
Owner

CliffordNumbers.jl defines two functions with names that conflict with those of already existing packages which are not dependencies, even though they are semantically compatible:

  • CliffordNumbers.dot, which calculates the dot product of multivectors, conflicts with LinearAlgebra.dot.
  • CliffordNumbers.similar_type, which generates types similar to a given type, conflicts with StaticArrays.similar_type.

The latter is solved by not exporting CliffordNumbers.similar_type. At the moment, CliffordNumbers.dot is exported, but it may make sense to not export it for the time being: in part because left and right contractions are usually favored over dot products for their more regular properties, and I'd like to encourage users to use those functions instead.

However, I'd like these functions to be exported when the package is loaded without either running into name conflicts with these packages or requiring a dependency on them. This may not be straightforward, and may even require some of this functionality to be placed in metapackages. Hopefully this can be accomplished using package extensions.

@brainandforce
Copy link
Owner Author

Update: I think I'm going to partially fix this in version 0.2 through package extensions that provide the relevant methods to functions from StaticArraysCore and LinearAlgebra.

This won't resolve the issue of these functions not being exported when only this package is loaded, but they will be available if the listed packages or anything depending on them is loaded.

@brainandforce
Copy link
Owner Author

One other issue I found was CliffordNumbers.normalize and LinearAlgebra.normalize. That'll also be included in the package extension, but that means it will not be immediately available for use.

@brainandforce
Copy link
Owner Author

This issue was fixed with #29

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

No branches or pull requests

1 participant