---
title: "Introducing @DependencyEntry"
url: https://daily.dev/posts/introducing-dependencyentry-qtbe80zmm
source_url: https://www.pointfree.co/blog/posts/213-introducing-dependencyentry
type: article
source: "Point-Free Pointers"
published: 2026-06-17T16:52:32.899Z
updated: 2026-06-17T16:52:50.631Z
tags: ["swift", "swiftui", "dependency-injection"]
reading_time: 4
upvotes: 3
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Introducing @DependencyEntry

**[Point-Free Pointers](https://daily.dev/sources/pointfree)** · 4 min read · 3 upvotes · 0 comments

## Summary

The swift-dependencies library now ships a new `@DependencyEntry` macro that dramatically reduces boilerplate when registering dependencies. Inspired by SwiftUI's `@Entry` macro, it handles the library's three-environment model (live, preview, test) through a concise API: the property initializer becomes the `testValue`, while `liveValue:` and `previewValue:` can be passed as macro arguments. Omitting `liveValue` keeps the dependency conforming only to `TestDependencyKey`, preserving the ability to separate interface from live implementation for modular codebases. Available in Dependencies version 1.13 via the `DependenciesMacros` module.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.pointfree.co/blog/posts/213-introducing-dependencyentry>

---

Tags: [#swift](https://daily.dev/tags/swift), [#swiftui](https://daily.dev/tags/swiftui), [#dependency-injection](https://daily.dev/tags/dependency-injection)

[View this post on daily.dev](https://daily.dev/posts/introducing-dependencyentry-qtbe80zmm)
