# Packge + import or Internal + @testable import?

**URL:** <https://forums.swift.org/t/packge-import-or-internal-testable-import/74526>\
**Category:** Swift Testing\
**Tags:** access-control\
**Created:** [September 11, 2024, 8:26pm UTC](https://forums.swift.org/t/packge-import-or-internal-testable-import/74526 "2024-09-11T20:26:24Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![elsh](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/elsh/32/20413_2.png) [@elsh](https://forums.swift.org/u/elsh)\
**Post date:** [September 12, 2024, 5:35am UTC](https://forums.swift.org/t/packge-import-or-internal-testable-import/74526/5 "2024-09-12T05:35:35Z")

</div>

We don’t recommend adding `package` access level solely for testing purposes. However, if `package` is already extensively used in your production code, it would be a better alternative to `@testable`, as we've been discouraging the use of that annotation due to unmaintained bugs, with plans to eventually deprecate it. That said, if your project contains few `package` symbols or needs access to internal symbols for testing, `@testable` can still be an option.

For the default SPM test template, though, it might be worth moving away from `@testable` since `package` access control already grants visibility to symbols within the same package across modules, thus the need for `@testable` becomes redundant. cc @Max_Desiatov

---

_[View the full topic](https://forums.swift.org/t/packge-import-or-internal-testable-import/74526)._
