compiler
compiler copied to clipboard
Module name conflict: 'Force' from gampleman/elm-visualization and ianmackenzie/elm-units
As an additional example for #1625, there has been another potential module name conflict found between gampleman/elm-visualization
(which has a Force
module for doing force-based particle simulation) and ianmackenzie/elm-units
(which has a Force
module for constructing and converting between force values in different units).
This has not yet led to an actual reported conflict in user code, but it would seem quite natural to want to use both packages in a scientific/technical visualization app, and at least @dmy has expressed interest in using both packages together.
I've been bitten by this; I want to use the Force
module from the elm-visualization
package to add a force-directed graph to my project, but can't, because I'm already using elm-units
which exposes a module with the same name 😞
@ianmackenzie Oh, just noticed that you've published elm-units-prefixed
as a workaround. Thanks! 🙏
Yes, and I now use elm-units-prefixed
at work because we have both elm-units
and elm-visualization
in our codebase. It's worked pretty well, although I needed to add Quantity.unsafe
and Quantity.unwrap
functions since it's not possible to alias constructors/non-opaque types in the same way that you can alias functions, values and opaque types. (If elm-units
contained an exposed custom type with more than one constructor, then wrapping it would have been much trickier.)