# \`using\` a package that uses \`OrderedCollections\` can silently add function methods?

**URL:** <https://discourse.julialang.org/t/using-a-package-that-uses-orderedcollections-can-silently-add-function-methods/60741>\
**Category:** New to Julia\
**Tags:** question, type-piracy\
**Created:** [May 7, 2021, 7:24pm UTC](https://discourse.julialang.org/t/using-a-package-that-uses-orderedcollections-can-silently-add-function-methods/60741 "2021-05-07T19:24:31Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [May 7, 2021, 8:04pm UTC](https://discourse.julialang.org/t/using-a-package-that-uses-orderedcollections-can-silently-add-function-methods/60741/4 "2021-05-07T20:04:15Z")

</div>

> [@tomohiro\_soejima](#):
>
> I initially thought modules that are called inside a package wouldn’t be an issue because it’s separated by two `using` s (I call `Revise` which calls `OrderedCollections` ), but I suppose that is not the case?

No, that has no effect. There is only ever one instance of a given module, so the `OrderedCollections` inside `Revise` is the same one you get everywhere else (it is possible to have two unrelated modules with the same name, but that’s unrelated to what’s going on here).

> [@tomohiro\_soejima](#):
>
> As a follow-up question, does this mean there is nothing users can do to protect ourselves from type piracy, other than to hope they don’t exist?

You might try [Pirate Hunter](https://discourse.julialang.org/t/pirate-hunter/20402) (I haven’t used it myself)

> [@tomohiro\_soejima](#):
>
> In other words, not only do I need to hope a package I load is not committing type piracy, but I also need to hope all dependencies of the package did not commit type piracy?

Basically yes. In my experience, this is rarely a problem, but it is something to be aware of.

---

_[View the full topic](https://discourse.julialang.org/t/using-a-package-that-uses-orderedcollections-can-silently-add-function-methods/60741)._
